SA-MP Forums Archive
Need help by making classes. - 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: Need help by making classes. (/showthread.php?tid=256374)



Need help by making classes. - Ruty2 - 20.05.2011

I want to make a new class, this class must be class 61,

Now stays:

else if(classid => 18 )
{
gTeam[playerid] = TEAM_CIVIL;
}



But i want that everything between 18 and 60 is TEAM_CIVIL and 61 is TEAM_ADMIN

How do i do this?

I though something like:

else if(classid => 18 && =< 60)
{
gTeam[playerid] = TEAM_CIVIL;
}

But it doesn't work.


Re: Need help by making classes. - Vince - 20.05.2011

if(18 <= classid <= 60)

Or you could use a switch statement.