SA-MP Forums Archive
Need help on Random Cash - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Need help on Random Cash (/showthread.php?tid=194989)



Need help on Random Cash - DragonBlaster50 - 01.12.2010

Hey guys, this seems to be a newb question, I knew how to make Random money stuff but i forgot how to... (Stupid me.)

Anyways, Can someone make a random with $45 as max?
Thanks!


Re: Need help on Random Cash - Kitten - 01.12.2010

use

pawn Код:
new cash == random(number of cases);
switch(cash)
{
     case 0: GivePlayerMoney(playerid,10);
     case 1: GivePlayerMoney(playerid,20);
     case 2: GivePlayerMoney(playerid,15);
     case 3: GivePlayerMoney(playerid,25);
     // blah blah
}