help me with this admin script please
#1

pawn Код:
if (strcmp(cmdtext, "/admins", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SendClientMessage(playerid, COLOR_GREEN, "Admins Online:");
            for(new i = 0; i < MAX_PLAYERS; i++)
            {
                if(IsPlayerConnected(i))
                {
                    if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pHide] == 0)
                    {
                        new admin[20];
                        if(PlayerInfo[playerid][pAdmin] == 1) { admin = "Test Admin"; }
                        else if(PlayerInfo[playerid][pAdmin] == 2) { admin = "Moderator"; }
                        else if(PlayerInfo[playerid][pAdmin] == 3) { admin = "Administrator"; }
                        else if(PlayerInfo[playerid][pAdmin] == 4) { admin = "Owner"; }
                        new sendername[MAX_PLAYER_NAME];
                        GetPlayerName(i, sendername, sizeof(sendername));
                        if(PlayerInfo[i][aDuty] == 0)
                        {
                            format(string, 256, "%s:{FFFF00}%s(ID:%d)   {FF0000}Off-Duty",admin,  sendername, i);
                            SendClientMessage(playerid, COLOR_RED, string);
                        }
                        else if(PlayerInfo[i][aDuty] == 1)
                        {
                            format(string, 256, "%s:{FFFF00}%s(ID:%d)   {00FF00}On-Duty",admin, sendername, i);
                            SendClientMessage(playerid, COLOR_GREEN, string);
                        }
                        else
                        {
                            SendClientMessage(playerid, COLOR_YELLOW, "No admins online!");
                        }
                    }
                }
            }
            SendClientMessage(playerid, COLOR_GREEN, "______________");
        }
        return 1;
    }
when i use command all admins have the first listed admin rank?
Reply


Messages In This Thread
help me with this admin script please - by Hugoca - 23.11.2012, 17:15
Re: help me with this admin script please - by CmZxC - 23.11.2012, 17:23
Re: help me with this admin script please - by Hugoca - 23.11.2012, 17:26
Re: help me with this admin script please - by YoYo123 - 23.11.2012, 18:43

Forum Jump:


Users browsing this thread: 1 Guest(s)