SA-MP Forums Archive
Member 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Member check. (/showthread.php?tid=74129)



Member check. - -eXo - 20.04.2009

How could I make this so a member of faction 1 and 2 could use it?,

Код:
  if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1)



Re: Member check. - Pyrokid - 20.04.2009

pawn Код:
if(OnDuty[playerid] != 1 && PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2)
|| is the operator for or.


Re: Member check. - Francis[French] - 20.04.2009

Hi there,

That couldn't work. You should always separate statements with parentheses. Like this:
pawn Код:
if(OnDuty[playerid] != 1 && (PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pMember] == 2))
Have fun scripting.

Kind regards,

Francis Morissette
SA-MP Scripter
http://sa-mp.com