How to use IsPlayerAdmin??
#1

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

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

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

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

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
Reply
#5

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.
Reply
#6

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.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)