SA-MP Forums Archive
/admins command help - 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)
+--- Thread: /admins command help (/showthread.php?tid=555681)



/admins command help - FlavioCesar - 08.01.2015

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;
}



Re: /admins command help - MohanedZzZ - 08.01.2015

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



Re: /admins command help - Larceny - 08.01.2015

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.


Respuesta: /admins command help - FlavioCesar - 08.01.2015

Thanks!!!