/admins
#1

How would i do /admins to display all online admins
Reply
#2

This is assuming that you are using zcmd, and not strcmp.

pawn Код:
CMD:admins(playerid, params[])
{
    foreach(Player, i) // Make sure you have the 'foreach' include as well. if not, you can use for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(PlayerInfo[i][pAdmin] >= 1) // or 2, your choice
        {
            // Assuming you don't have a function to get the players name, like RPN, or GetPlayerNameEx
            new pname[MAX_PLAYER_NAME], string[256];
            GetPlayerName(i, pname, sizeof(pname));
            format(string, sizeof(string), "Admin %s", pname);
            SendClientMessage(playerid, -1, string);
        }
    }
    return 1;
}
This is just a simple version. Does not include ranks, or anything like that. If you would like that, just message me.
Reply
#3

i dont need ranks, thanks for this
Reply
#4

Quote:
Originally Posted by thefatshizms
Посмотреть сообщение
i dont need ranks, thanks for this
No problem. Glad to help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)