Mislim da je ovde problem
if(strcmp(cmd,"/ukradi",true)==0)
{
if(IsPlayerConnected(playerid))
{
new x_nr[128];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr)) {
SendClientMessage(playerid, COLOR_WHITE, "Koriscenje: /ukradi [ime]");
SendClientMessage(playerid, COLOR_WHITE, "Moguce Komande: novac, oruzije.");
return 1;
}
if (PlayerInfo[playerid][pJob] != 23)
{
SendClientMessage(playerid,COLOR_GREY," Nisi Lopov !");
return 1;
}
if(strcmp(x_nr,"novac",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koriscenje: /ukradi novac [ID Igraca/Dio Imena]");
return 1;
}
new lopov;
lopov = ReturnUser(tmp);
if(IsPlayerConnected(lopov))
{
if(lopov != INVALID_PLAYER_ID)
{
if(GetPlayerMoney(giveplayerid) > RandomPare[random(sizeof(RandomPare))])
{
format(string, sizeof(string), "* Ukrao si $%d od %s .", RandomPare, giveplayerid);
SendClientMessage(playerid, COLOR_WHITE, string);
SafeGivePlayerMoney(playerid, RandomPare[random(sizeof(RandomPare))]);
format(string, sizeof(string), "* %s ti je ukrao $%d .", playerid, RandomPare);
SendClientMessage(giveplayerid, COLOR_WHITE, string);
SafeGivePlayerMoney(giveplayerid, -RandomPare[random(sizeof(RandomPare))]);
}
else
{
format(string, sizeof(string), " Igrac nema $%d !", RandomPare);
SendClientMessage(playerid, COLOR_GREY, string);
}
}
}
}
}
else if(strcmp(x_nr,"deliver",true) == 0)
{
if(PlayerToPoint(3.0,playerid,2146.3523,-2267.7498,14.2344))
{
if(MatsHolding[playerid] > 0)
{
new payout = (50)*(MatsHolding[playerid]);
format(string, sizeof(string), "* The Factory Gave You %d Materials from your %d Packages.", payout, MatsHolding[playerid]);
SendClientMessage(playerid, COLOR_WHITE, string);
PlayerInfo[playerid][pMats] += payout;
MatsHolding[playerid] = 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You don't have any Materials Packages!");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not at the Willowfield Gun Factory.");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Invalid Materials Name !");
return 1;
}
}
return 1;
}
Naucite postati po pravilima jbt.
http://balkan-samp.com/forum/index.php?topic=11453.0
Mislim da treba da ÄitaÅ¡ pravila!