As suggestion: you can simplify that if-clause. Following should do the same:
if (ENABLED and ((Team = 1) or (Team = 2) or (Team = 3) or (Team = 4)))
if (ENABLED and (Team <> 5))
If you need a combination, like only forbidding to join alpha and bravo team, you can use: (Team < 3)