Vegas. wrote on August 27, 2012, 6:09 pm:
if (strcmp(cmd, "/prodajzlato", true) == 0)
{
new kolicina;
new zlato = PlayerInfo;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE,"Koristenje: /prodajzlato ");
return 1;
}
if(kolicina > zlato || kolicina < 0) return SendClientMessage(playerid, COLOR_GREY, " Nemate toliko zlata!");
if(!IsPlayerInRangeOfPoint(playerid, 2,1419.4282,-1011.0353,2853.7178)) return SendClientMessage(playerid, COLOR_WHITE, "Morate biti u banci da bi prodali zlato");
else
{
SafeGivePlayerMoney(playerid, kolicina*10)
PlayerInfo -= kolicina;
}
return 1;
}
Popravio si mi error e sad imam problem radu komande sve za rudara ali ne radu ostale komande...
Radu samo komande za rudara.
evo komande koje radu:
if (strcmp(cmd, "/rudnik", true) == 0)
{
if(PlayerInfo == 24)
{
if(UzeoOpremu == 0) return SendClientMessage(playerid, COLOR_GREY, "Morate prvo uzeti opremu u kucici na vrhu rudnika!");
if(IsPlayerInRangeOfPoint(playerid, 350, 604.7141,867.4781,-40.2878))
{
if(NaPoslu == 1) return SendClientMessage(playerid, COLOR_WHITE, "** Vec ste na poslu.");
SetPlayerCheckpoint(playerid, 551.3589,852.8019,-42.5268, 5.0);
CP = 2;
NaPoslu = 1;
SendClientMessage(playerid, COLOR_WHITE, "Idi do CheckPoint-a i pocni da kopas");
}
}
else SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}{FFFFFF}Moras biti rudar da bi mogao raditi u rudniku!");
return 1;
}
if (strcmp(cmd, "/prekinikopanje", true) == 0)
{
if(PlayerTied == 1 || PlayerCuffed > 0)
{
SendClientMessage(playerid, COLOR_GREY, "**Vezani ste, ne mozete da koristite ovu komandu!");
return 1;
}
if(KnockedDown == 1)
{
SendClientMessage(playerid, COLOR_GREY, "Ne mozete da koristite ovu komandu, nokautirani ste.");
return 1;
}
if(PlayerInfo == 1)
{
SendClientMessage(playerid, COLOR_GREY, "Ne mozete da koristite ovu komandu, zaledjeni ste.");
return 1;
}
if(NaPoslu == 0) return SendClientMessage(playerid, COLOR_WHITE, "** Niste na poslu.");
DisablePlayerCheckpoint(playerid);
KillTimer(rudniktimer);
CP = 0;
NaPoslu = 0;
PlayerInfo = 0;
TogglePlayerControllable(playerid, 1);
SendClientMessage(playerid, COLOR_WHITE, "Prekinuo si kopanje");
return 1;
}
RJESIO SAM MOZE LOCK!!!(TREBAO FORWARD NEKE STVARI!