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



Randomizer - Rokzlive - 21.12.2011

How do you make a randomizer that chooses randomly between 6 cases?

I totally forgot.


Re: Randomizer - Tee - 21.12.2011

pawn Код:
new rand = random(6);
switch(rand)
{
    case 1:
    {
        //Do somthing
    }
    case 2..4:
    {
        //If when case is between 2 and 4 inclusive do something.
    }
}



Re: Randomizer - Rokzlive - 21.12.2011

Wow i forget the simplest of things... and thanks.


Re: Randomizer - Tee - 21.12.2011

Yea...we all do.