how to make a admin cmds
#1

how to make a admin /Admins who online? like the /admins like u going to see who the admins is..
Reply
#2

Код:
CMD:admins(playerid, params[])
{
    SendClientMessage(playerid, 0x1FFFFFF, "Administrators online:");
    foreach(Player, i)
    {
        new level[128], string[128];
        if(PlayerInfo[i][Admin] > 0)
        {
            switch(PlayerInfo[i][Admin])
            {
                case 1: level = ""adminlevel1" (1)";
                case 2: level = ""adminlevel2" (2)";
                case 3: level = ""adminlevel3" (3)";
                case 4: level = ""adminlevel4" (4)";
                case 5: level = ""adminlevel5" (5)";
            }
            format(string, sizeof(string), "%s %s", level, PlayerName(i));
            SendClientMessage(playerid, 0xFFF84FFFF, string);
        }
    }
    return 1;
}
Change PlayerInfo[i][Admin] to your admin variable.

Adjust cases to match your admin levels.

EDIT: Place it at the bottom of the script and also add #include <zcmd> at the top. And download ZCMD command processor if you don't have it.
Reply
#3

where i put it? under something.
Reply
#4

LIKE HE SHOWED ^
|
|
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)