multiple values in if(classid == _)
#1

how can i add multiple values in if(classid == 0)
i want to have multiple classes in 1 group of commands that changes the player color etc because of multiple gang skins

so in my idea:

if(classid == 0, 1, 2) and so on. if thats possible but in another way ofcourse.

thanks boys.
Reply
#2

switch(classid)
{
case 1: {}
case 2: {}
case n: {}
}
n = number of class
You can use swtich, better than if , if, if
Reply
#3

use || - that stands for OR..
example:

if(classid == 0 || classid == 1 || classid == 2)

however, as said above, switches are faster
Reply
#4

Quote:
Originally Posted by izeatfishz
Посмотреть сообщение
use || - that stands for OR..
example:

if(classid == 0 || classid == 1 || classid == 2)

however, as said above, switches are faster
thanks bro really appreciate it. i just got into scripting and im scripting a simple freeroam script
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)