Is there an "or" statement? - 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: Is there an "or" statement? (
/showthread.php?tid=606054)
Is there an "or" statement? -
UnholyBeast - 29.04.2016
So. From what I know, and from this question. Most if not all of you will believe it's next to nothing. Is there an "or" statement, and how can I use it in an if statement? I'll give you an example of what I am trying to do.
Код:
if(gTeam[playerid] == TEAM_POLICE)
How would I add an "or" to that, so it can check if the player is a different type of law enforcer. (SWAT, FBI, CIA, or Army)?
Re: Is there an "or" statement? -
Unte99 - 29.04.2016
Код:
if(gTeam[playerid] == TEAM_POLICE || gTeam[playerid] == TEAM_SWAT)
Re: Is there an "or" statement? -
UnholyBeast - 29.04.2016
Thank you very much.
Re: Is there an "or" statement? -
introzen - 29.04.2016
Check out the operators here:
https://sampwiki.blast.hk/wiki/Control_...ures#Operators