SA-MP Forums Archive
Help with operators - 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: Help with operators (/showthread.php?tid=350424)



Help with operators - bogdyutzu - 12.06.2012

Is possible to make something like

PHP код:
if(g_PlayerFlags[i][intTeam] & _:(Cop SWAT FBI Army Navy))
{
    
// do something

I want to evit this method

PHP код:
g_PlayerFlags[i][intTeam] == Cop || g_PlayerFlags[i][intTeam] == SWAT..... 



Re: Help with operators - Jonny5 - 12.06.2012

you could use a switch statement or
bit flags. both covered in the forums and on the wiki.