[Pomoc] Pekara

Započeo Milos25
31. Okt. 2012. Zaključano
330
pregleda
6
postova
Milos25
4
Enforcer
31. Okt. 2012.
Skripta koju koristim: nbe

Pitanje: Imam komandu /pekara al kada ocu da compile nece da compile

A to se desava samo kad ima velika greska

Ako moze neko da mi popravi komandu
if(strcmp(cmdtext, "/pekara", true) == 0)
    {
    if (IsPlayerInRangeOfPoint(playerid, 5.0,1711.9424,-1133.4629,24.0859))
      ShowPlayerDialog(playerid, DIALOG_PEKARA, DIALOG_STYLE_LIST, "BUY & USE", "Hleb Sava[130 $]\nSendvic[100 $]\nPizza[110 $]", "Kupi", "Izadji");
      }
          return 1;
    }
Dusan_Najdic
3
Hustler
31. Okt. 2012.
Aj probaj ovako
if(strcmp(cmdtext, "/pekara", true) == 0)
    {
    if (IsPlayerInRangeOfPoint(playerid, 5.0,1711.9424,-1133.4629,24.0859))
    {
      ShowPlayerDialog(playerid, DIALOG_PEKARA, DIALOG_STYLE_LIST, "BUY & USE", "Hleb Sava[130 $]\nSendvic[100 $]\nPizza[110 $]", "Kupi", "Izadji");
      }
else
{
SendClientMessage(playerid,-1,"Niste u pekari");
}
          return 1;
    }
Milos25
4
Enforcer
31. Okt. 2012.
a kako mogu namestiti da dobija se hp

na primer kad se uzme hleb da se dobije 40hp

kad se uzme sendvic da se dobije 20hp

i kad se uzme pica da se dobije 30hp
Milos25
4
Enforcer
31. Okt. 2012.
ok hvala 😄
Milos25
4
Enforcer
31. Okt. 2012.
jel mozes ti ja sam probao ali ne ide mi ☹️
if(dialogid == DIALOG_PEKARA)
        {
        if(response)
        {
        new musterija;
        if(listitem == 0)
    {
new novac;
        novac = 130;
        if(novac > JBC_GetPlayerMoney(playerid)) return SCM(playerid, COLOR_GREY, "  Nemate dovoljno novca!");
    PlayerInfo++;
    ApplyAnimation(playerid,"DEALER","shop_pay",4.1,0,0,0,0,0);
    JBC_GivePlayerMoney(playerid, -130);
    GetPlayerName(playerid, musterija, sizeof(musterija));
        format(string, sizeof(string), "* %s kupuje Hleb Sava (/pekara) .", musterija);
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        }
if(listitem == 1)
    {
    new novac;
        novac = 100;
        if(novac > JBC_GetPlayerMoney(playerid)) return SCM(playerid, COLOR_GREY, "  Nemate dovoljno novca!");
        PlayerInfo++;
    ApplyAnimation(playerid,"DEALER","shop_pay",4.1,0,0,0,0,0);
    JBC_GivePlayerMoney(playerid, -100);
    GetPlayerName(playerid, musterija, sizeof(musterija));
        format(string, sizeof(string), "* %s kupuje sendvic (/pekara) .", musterija);
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        }
if(listitem == 2)
    {
        new novac;
        novac = 110;
        if(novac > JBC_GetPlayerMoney(playerid)) return SCM(playerid, COLOR_GREY, "  Nemate dovoljno novca!");
    PlayerInfo++;
    ApplyAnimation(playerid,"DEALER","shop_pay",4.1,0,0,0,0,0);
        JBC_GivePlayerMoney(playerid, -110);
        GetPlayerName(playerid, musterija, sizeof(musterija));
        format(string, sizeof(string), "* %s kupuje pizzu (/pekara) .", musterija);
        ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        }
        }
        }
Dusan_Najdic
3
Hustler
31. Okt. 2012.
Na dno skripte dodaj
stock GivePlayerHealth(playerid,Float:Health)
{
new Float:health; GetPlayerHealth(playerid,health);
SetPlayerHealth(playerid,health+Health);
}


I onda kad se izabere nesto u dialog response stavljas
GivePlayerHealth(playerid,kolikohelta);

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha