Rcon admin
#1

How can I check if some one is an admin in rcon, i believe its like if(IsPlayerAdmin){ .. or something?
Reply
#2

pawn Код:
for(new i < MAX_PLAYERS; i < 13; i++)
{
SendClientMessage(playerid, -1,"Rcon Admins");
if(IsPlayerAdmin(playerid))
{
new name[MAX_PLAYER_NAME], string[128];
GetPlayerName(i, name, sizeof(name));
format(string, sizeof(string),"%s[ID: %d]", name, i);
SendClientMessage(playerid, -1, string);
}
}
I am not sure it will work or not.
But i tried.
Reply
#3

You initialize a loop and fail to use the selected variable?
Reply
#4

pawn Код:
if(isPlayerAdmin(playerid) {
    // Player is an RCON admin
}
OR, if you want to check for all the players in-game (post #2 is wrong code)

pawn Код:
for(new i=0; i<MAX_PLAYERS; i++) {
    if(isPlayerAdmin(i)) {
        // Player i is RCON admin
        // Add them to a string, or print their name or w/e here
    }
}
Reply
#5

Oh
it means my code was totally wrong.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)