Help with /admins
#2

An example of an /admins command ( with IsPlayerAdmin check, change with your own. )

pawn Код:
CMD:admins( playerid, params[ ] )
{
    new
        iCounts,
        tempString[ 128 ],
        admName[ 24 ]
    ;

    SendClientMessage( playerid, -1, "Current online administrators:" );

    foreach (Player, i)
    {
        if ( IsPlayerAdmin( i ) )
        {
            counts ++;

            GetPlayerName( i, admName, sizeof admName );

            format( tempString, sizeof ( tempString ), "%s ( %d )", admName, i );

            // format( tempString, sizeof ( tempString ), "%s ( %d ) : Level : %d.", admName, i, pInfo[ playerid ][ pLevel ] );

            SendClientMessage( playerid, tempString );
        }
    }

    if ( !counts )
        SendClientMessage( playerid, "No administrators online." );

    return 1;
}
That should helps.
Reply


Messages In This Thread
Help with /admins - by Millionaire - 12.07.2011, 09:41
Re: Help with /admins - by Basicz - 12.07.2011, 10:48
Re: Help with /admins - by Millionaire - 12.07.2011, 12:18
Re: Help with /admins - by Shadoww5 - 12.07.2011, 13:25
Re: Help with /admins - by Millionaire - 12.07.2011, 14:31

Forum Jump:


Users browsing this thread: 1 Guest(s)