03.08.2010, 23:32
I made a rob commad earlier, it seems as if you /rob nothing happens. like under the command it just returns 0.
pawn Код:
if(!strcmp(cmdtext, "/rob", true))
{
if(LCS_IsPlayerInAnyCheckpoint(playerid))
{
if(AccountInfo[playerid][ROBBED] == 0)
{
switch(random(3))
{
case 1:
{
new rCash = random(25000);
GivePlayerMoney(playerid, rCash);
format(string, sizeof(string), "You have robbed %d!",rCash);
SendClientMessage(playerid, GREEN, string);
}
case 2: SendClientMessage(playerid, RED, "You have failed at robbing! RUN!!!");
case 3: SendClientMessage(playerid, RED, "You have failed at robbing! RUN!!!");
}
AccountInfo[playerid][ROBBED] = 1;
SetTimerEx("Robbed",150000,0,"%d",playerid);
}
else SendClientMessage(playerid, RED, "You must wait before robbing again!");
}
else SendClientMessage(playerid, RED, "You aren't at any area to rob!");
return 1;
}