Whats wrong with this gteam check? - 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: Whats wrong with this gteam check? (
/showthread.php?tid=407212)
Whats wrong with this gteam check? -
101 - 13.01.2013
pawn Код:
if(gTeam[playerid] != LSPD1 || LSPD2 || CIA || ARMY || SWAT || FBI ) return SendClientMessage(playerid, COLOR_WHITE, "you need to be police");
It always tells me "you need to be police"
Re: Whats wrong with this gteam check? -
ReneG - 13.01.2013
pawn Код:
if(gTeam[playerid] != LSPD1 || gTeam[playerid] != LSPD2 || gTeam[playerid] != CIA || gTeam[playerid] != ARMY || gTeam[playerid] != SWAT || gTeam[playerid] != FBI )
Re: Whats wrong with this gteam check? -
101 - 13.01.2013
Well same thing happens even with that code

Maybe && instead of ||? I know that on checkpoints you can't use || you have to use &&
Re: Whats wrong with this gteam check? -
ReneG - 13.01.2013
Whoops. You're right, it should be
pawn Код:
if(gTeam[playerid] != LSPD1 && gTeam[playerid] != LSPD2 && gTeam[playerid] != CIA && gTeam[playerid] != ARMY && gTeam[playerid] != SWAT && gTeam[playerid] != FBI)
sorry about that