SA-MP Forums Archive
/admins 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 help? (/showthread.php?tid=345546)



/admins help? - jtemple042996 - 25.05.2012

I need a command that shows a list of admins on the server:

I use alevel[playerid]
alevel[playerid] == 1(Moderator)
alevel[playerid] == 2(Administrator)
alevel[playerid] == 900(Manager)
alevel[playerid] == 950(Leader)
alevel[playerid] == 999(Owner)

I just cant figure it out...


Re: /admins help? - Catalyst- - 25.05.2012

pawn Код:
new count = 0;
for(new i = 0; i < MAX_PLAYERS; i++)
{
    if(IsPlayerConnected(i))
    {
        if(alevel[i] > 0)
        {
            new admin[24];
            GetPlayerName(i, admin, 24);
            SendClientMessage(playerid, 0x00FF00FF, admin);
            count++;
        }
    }
}
if(count == 0)
    SendClientMessage(playerid, 0xFF0000FF, "There are no admins online");