18.02.2012, 19:55
Hi there, I am making a bank robbery system but for some reason it always says You failed to rob the bank!
code for the actuall money giving:
code for the actuall money giving:
pawn Код:
forward robbing(playerid);
public robbing(playerid)
{
new succeed = RandomEx(01, 100);
if(succeed >= 30)
{
new str[128];
new moneyer = RandomEx(01, 10000);
GivePlayerCash(playerid, moneyer);
format(str, sizeof(str), "You succesfully robbed the bank and got $%d!", moneyer);
SCM(playerid, COLOR_GREEN, str);
SetTimerEx("canrobb", 1200000, false, "i", playerid);
}
else if(succeed < 30)
{
SCM(playerid, COLOR_GREEN, "You failed at robbing the bank!");
SetTimerEx("canrobb", 1200000, false, "i", playerid);
}
return 1;
}