SA-MP Forums Archive
Lotto more 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Lotto more random numbers (/showthread.php?tid=144629)



Lotto more random numbers - ArTisT - 28.04.2010

Hey all

It's like that always the same numbers coming and not the numbers like 1 2 3 5 6 49 etc..

How can i make it that it should be full random (max number should be 49)
Quote:

new rand = random(49);?
if(rand < 47) rand += 3;
Lotto(rand);




Re: Lotto more random numbers - Sascha - 28.04.2010

[49] not (49) I think


Re: Lotto more random numbers - CAR - 28.04.2010

I don't know exactly what you mean:
pawn Код:
new rand = random(49); // 49 is MAX so correct
if(rand < 47) rand += 3; // I don't know what you mean with this
Lotto(rand);// I think you mean: Lotto = rand;
But if you want Lotto = 1 until 49 then you can use this:
pawn Код:
Lotto = random(49);