19.01.2010, 13:45
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;
}