SA-MP Forums Archive
Random Numbers - 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)
+--- Thread: Random Numbers (/showthread.php?tid=523562)



Random Numbers - kingcrome - 02.07.2014

How Can I Create SomeThing That Will give me random numbers and then use it to give people money?


AW: Random Numbers - Macronix - 02.07.2014

You want to generate a random money value?

pawn Код:
new randomvalue = random(2000); // this will choose a random value between 0 and 2000
GivePlayerMoney(playerid, randomvalue); // this will give a player the random value



Re: Random Numbers - Konstantinos - 02.07.2014

https://sampwiki.blast.hk/wiki/Random

or

pawn Код:
stock RandomEx(min, max) // By ******
{
    return random(max - min) + min;
}