[HELP] last admin on server
#2

Replace IsPlayerAdmin with the variable you store the player's admin level.

pawn Код:
public OnPlayerDisconnect( playerid, reason )
{
    if( IsPlayerAdmin( playerid ) )
    {
        new
            count
        ;
        for( new i; i != MAX_PLAYERS; i++ )
        {
            if( IsPlayerConnected( i ) && IsPlayerAdmin( i ) && i != playerid ) count++;
        }
        if( !count) SendClientMessageToAll( -1, "All the admins have left." );
    }
    return 1;
}
Reply


Messages In This Thread
[HELP] last admin on server - by Luca12 - 13.10.2013, 11:54
Re: [HELP] last admin on server - by Konstantinos - 13.10.2013, 12:01

Forum Jump:


Users browsing this thread: 1 Guest(s)