SA-MP Forums Archive
How to use IsPlayerAdmin?? - 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: How to use IsPlayerAdmin?? (/showthread.php?tid=83763)



How to use IsPlayerAdmin?? - ErYcK - 27.06.2009

I have []DIH[]Killer's AdminHouse and i want to make it dat just the admins can go there
How can I make that?


Re: How to use IsPlayerAdmin?? - Grim_ - 27.06.2009

Go into the code of where you enter, ect and put this:
[pawn]
if(!IsPlayerAdmin(playerid)) return 1;
[/panw]


Re: How to use IsPlayerAdmin?? - Lazarus - 27.06.2009

pawn Код:
if(IsPlayerAdmin(playerid) == 0) return 1;

//continue with code to enter
Remember: IsPlayerAdmin only detects if that player is an rcon admin.


Re: How to use IsPlayerAdmin?? - Grim_ - 27.06.2009

Yours is incorrect. Yours checks if they are an admin, then don't allow the code to continue. Use below:
pawn Код:
if(!IsPlayerAdmin(playeird)) return 1; //if they're not an admin, don't let them enter



Re: How to use IsPlayerAdmin?? - Chaprnks - 27.06.2009

Quote:
Originally Posted by Swift_
Yours is incorrect. Yours checks if they are an admin, then don't allow the code to continue. Use below:
IsPlayerAdmin(playerid) == 0 and !IsPlayerAdmin(playerid) are the same thing. They both check if the value is 0.


Re: How to use IsPlayerAdmin?? - Grim_ - 27.06.2009

Quote:
Originally Posted by ǝɹoɯ‾ʎ
Quote:
Originally Posted by Swift_
Yours is incorrect. Yours checks if they are an admin, then don't allow the code to continue. Use below:
IsPlayerAdmin(playerid) == 0 and !IsPlayerAdmin(playerid) are the same thing. They both check if the value is 0.
My bad, I didn't see that he had == 0.
Sorry Lazarus.