random vaule
#5

if you'd like to make it run out of chance (say 1 of 10 chance) you could do this:

pawn Код:
#define CHANCE_DEF /* Your chance selection */
#define RAND_STEAL /* How much in random do you want them to steal?*/

stock RobBank(playerid)
{
new chance = Random(9); // CHANCE COUNTS FROM 0

if(chance == CHANCE_DEF)
{
GivePlayerMoney(playerid,Random(RAND_STEAL));
}
else
{
SendClientMessage(playerid,COLOR,"Un-successful in robbing bank");
}
return 1;
}
Reply


Messages In This Thread
random vaule - by sggassasin - 19.01.2010, 13:00
Re: random vaule - by pagie1111 - 19.01.2010, 13:07
Re: random vaule - by sggassasin - 19.01.2010, 13:16
Re: random vaule - by Vetle - 19.01.2010, 13:28
Re: random vaule - by pagie1111 - 19.01.2010, 13:45

Forum Jump:


Users browsing this thread: 1 Guest(s)