View Full Version : Is there an "or" statement?

29/04/2016, 06:07 AM
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)?

29/04/2016, 06:16 AM
if(gTeam[playerid] == TEAM_POLICE || gTeam[playerid] == TEAM_SWAT)

29/04/2016, 06:18 AM
Thank you very much.

29/04/2016, 08:28 AM
Check out the operators here: https://wiki.sa-mp.com/wiki/Control_Structures#Operators