Whats the difference between "!IsPlayerAdmin(playerid))" and "IsPlayerAdmin(playerid))" - 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: Whats the difference between "!IsPlayerAdmin(playerid))" and "IsPlayerAdmin(playerid))" (
/showthread.php?tid=278293)
Whats the difference between "!IsPlayerAdmin(playerid))" and "IsPlayerAdmin(playerid))" -
lewismichaelbbc - 21.08.2011
Whats the difference between "!IsPlayerAdmin(playerid))" and "IsPlayerAdmin(playerid))"
Thanks
Re: Whats the difference between "!IsPlayerAdmin(playerid))" and "IsPlayerAdmin(playerid))" -
Wesley221 - 21.08.2011
pawn Code:
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are NOT an admin! ");
if(IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "You are an admin! ");
So practicly with the first one it will check if youre not an admin, and with the second it will check if youre an admin
Re: Whats the difference between "!IsPlayerAdmin(playerid))" and "IsPlayerAdmin(playerid))" -
Andregood - 21.08.2011
The first one means the opposite, that they're not administrators.
Re: Whats the difference between "!IsPlayerAdmin(playerid))" and "IsPlayerAdmin(playerid))" -
lewismichaelbbc - 21.08.2011
Thanks.
Re: Whats the difference between "!IsPlayerAdmin(playerid))" and "IsPlayerAdmin(playerid))" -
grand.Theft.Otto - 21.08.2011
An exclamation mark ( ! ) in any pawn code means NOT.
pawn Code:
if(!IsPlayerConnected(playerid)) // is player NOT connected
if(!IsPlayerNPC(playerid)) // is player NOT an NPC
if(!IsPlayerInRangeOfPoint(playerid)) // is player NOT in range of point
Read the Operators section for more info:
https://sampwiki.blast.hk/wiki/Control_Structures#Operators