Random aint random
#1

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:
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;
}
Reply


Messages In This Thread
Random aint random - by milanosie - 18.02.2012, 19:55
Re: Random aint random - by DaRkM - 18.02.2012, 19:59
Re: Random aint random - by aRoach - 18.02.2012, 20:02
Re: Random aint random - by milanosie - 18.02.2012, 20:17
Re: Random aint random - by DaRkM - 19.02.2012, 06:35
Re: Random aint random - by milanosie - 19.02.2012, 11:19
Re: Random aint random - by aRoach - 19.02.2012, 11:26
Re: Random aint random - by milanosie - 19.02.2012, 11:28
Re: Random aint random - by aRoach - 19.02.2012, 11:29
Re: Random aint random - by milanosie - 19.02.2012, 11:32

Forum Jump:


Users browsing this thread: 1 Guest(s)