SA-MP Forums Archive
Random number - 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: Random number (/showthread.php?tid=200904)



Random number - hanzen - 19.12.2010

Hellooo

I know you can do random(2500), but I want to select a random number between 1000 and 2500. How could I solve this?

Would appreciate answers


Re: Random number - Norck - 19.12.2010

pawn Код:
new randnum = 1000+random(1501);//random number between 1000 and 2500



Re: Random number - hanzen - 19.12.2010

Quote:
Originally Posted by Norck
Посмотреть сообщение
pawn Код:
new randnum = 1000+random(1501);//random number between 1000 and 2500
Thanks!