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



case question - Zeus666 - 21.09.2018

PHP код:
    switch(random(25))
    {
case 
0
case 
1:
..........
case 
25
OR

PHP код:
    switch(random(26))
    {
case 
0
case 
1:
..........
case 
25
which is the correct form?


Re: case question - KinderClans - 21.09.2018

case 0 .. 1

case 25


Re: case question - UFF - 21.09.2018

Код:
    switch(random(26)) // from 0 to 25 = 26.
    { 
        case 0:  
        case 1: 
        .......... 
       case 25:  
    }



Re: case question - v1k1nG - 21.09.2018

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

It looks like you need this