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



Switch question - PaulDinam - 22.10.2012

I can use something like that?
switch(level)
{
case 1-5:
bank += randomEx(300,310);
it will be 1 to 5?


Re: Switch question - Virus. - 22.10.2012

u can use it this way


switch(level)
{
case 1:
case 2:
case 3:
case 4:
case 5:
bank += randomEx(300,310);


Re: Switch question - CentyPoo - 22.10.2012

https://sampwiki.blast.hk/wiki/Control_Structures
Код:
case 1 .. 5: