/admins command help
#1

Hi guys. I have this command to look at the online admins, but I want to know how to when the player is RCON not appear in the list of admins. I need your help please!

pawn Code:
dcmd_admins( playerid, params[] )
{
    #pragma unused params

    new
        szString[ 128 ] = "* ",
        szName  [ MAX_PLAYER_NAME ],
        iCnt,   iAdminCnt;

    SendClientMessage( playerid, COLOR_RED, "Administradores:" );

    loopPlayers( i )
    {
            if ( IsPlayerAdmin( playerid ) || pData[ playerid ][ P_LEVEL ] >= _:P_LEVEL_ADMIN )
        {
            iCnt        ++;
            iAdminCnt   ++;

            GetPlayerName( i, szName, MAX_PLAYER_NAME );
            format( szString, sizeof( szString ), "%s%s (%d), ", szString, szName, i );

            if ( iCnt >= 4 )
            {
                SendClientMessage( playerid, COLOR_ORANGE, szString );

                szString= "* ";
                iCnt    = 0;
            }
        }
    }

    if ( iCnt )
        SendClientMessage( playerid, COLOR_ORANGE, szString );

    if ( iAdminCnt != 1 )
        format( szString, sizeof( szString ), "Hay %d administradores conectados.", iAdminCnt );
    else
        szString = "Hay un administrador conectado.";

    SendClientMessage( playerid, COLOR_WHITE, szString );

    return 1;
}
Reply
#2

Remove this code from your code
Code:
if ( IsPlayerAdmin( playerid )
Reply
#3

pawn Code:
if(IsPlayerAdmin(playerid) == false && pData[playerid][P_LEVEL] >= _:P_LEVEL_ADMIN )
If the player is logged in rcon, won't appear in the list.
Reply
#4

Thanks!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)