Help with /admin command
#9

Quote:
Originally Posted by povargek
View Post
You can try this.

Code:
CMD:admins(playerid, params[])
{
    new playername[MAX_PLAYER_NAME];
    
    if(GetPlayerScore(playerid) < 50) return SendClientMessage(playerid, COLOR_RED, "You need 50 score to see online administrators");
    new count = 0, string[828], AdmRank[128];
    new ChangeColor;
    SendClientMessage(playerid, COLOR_GREEN, " ");
    SendClientMessage(playerid, COLOR_GREEN, "___________ |- Online Admins -| ___________");
    SendClientMessage(playerid, COLOR_GREEN, " ");
    for(new i = 0; i < MAX_PLAYERS; i++) {
      if(IsPlayerConnected(i))
       {
        if (adlvl[i] >= 1)
        {
            GetPlayerName(i, playername, MAX_PLAYER_NAME);
            if(adlvl[i] >= 6)
            {
                AdmRank = "Server Owner/Developer";
                ChangeColor = COL_LEVEL4;
            }
            else
            {
                switch(adlvl[i])
                {
                    case 1: {
                    AdmRank = "Moderator";
                    ChangeColor = COL_LEVEL1;
                    }
                    case 2: {
                    AdmRank = "Senior Moderator";
                    ChangeColor = COL_LEVEL2;
                    }
                    case 3: {
                    AdmRank = "Administrator";
                    ChangeColor = COL_LEVEL3;
                    }
                    case 4: {
                    AdmRank = "Lead Administrator";
                    ChangeColor = COL_LEVEL4;
                    }
                    case 5: {
                    AdmRank = "Lead Administrator";
                    ChangeColor = COL_LEVEL4;
                    }
                }
            }
        }
        format(string, 128, "%s | %s", playername, AdmRank);
        SendClientMessage(playerid, ChangeColor, string);
        count ++;
      }
    }
    if(count == 0)
    SendClientMessage(playerid, ADMINSONLINE, "There are currently no administrators online.");
    return 1;
}
if(adlvl[i] >= 6)
That works. But if I'm undercover it still shows on /admins is there any way that if player is if(adminuc[playerid]) (UNDERCOVER) that their name won't show up on /admins no matter what level they are?
Reply


Messages In This Thread
Help with /admin command - by Tass007 - 03.02.2016, 09:43
Re: Help with /admin command - by jlalt - 03.02.2016, 09:56
Re: Help with /admin command - by KillerDVX - 03.02.2016, 09:58
Re: Help with /admin command - by Tass007 - 03.02.2016, 10:11
Re: Help with /admin command - by jlalt - 03.02.2016, 10:19
Re: Help with /admin command - by Sew_Sumi - 03.02.2016, 11:47
Re: Help with /admin command - by Tass007 - 03.02.2016, 18:46
Re: Help with /admin command - by povargek - 03.02.2016, 19:02
Re: Help with /admin command - by Tass007 - 03.02.2016, 19:30
Re: Help with /admin command - by Rufio - 03.02.2016, 19:46

Forum Jump:


Users browsing this thread: 1 Guest(s)