I need help getting the admin online totals
#1

I need help getting admin online totals on my /admins

here is the code

pawn Код:
CMD:admins(playerid,params[])
{
    new string[128],count = 0,level,adminname[MAX_PLAYER_NAME];
    level = PlayerInfo[playerid][pAdmin];
    GetPlayerName(playerid,adminname,128);
    for(new i = 0;i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
           if(PlayerInfo[playerid][pAdmin] >= 0)
           {
              switch(PlayerInfo[playerid][pAdmin])
              {
                 case 1: AdmRank = "Trial Moderator";
                 case 2: AdmRank = "Moderator";
                 case 3: AdmRank = "Global Moderator";
                 case 4: AdmRank = "Trial Manager";
                 case 5: AdmRank = "Header Administrator";
                 case 6: AdmRank = "Senior Administrator";
                 case 7: AdmRank = "Junior Administrator";
                 case 8: AdmRank = "Scripter/Mapper";
                 case 9: AdmRank = "Co-Owner";
              }
              if(PlayerInfo[playerid][pAdmin] >= 10)
              {
                 AdmRank = "Server Owner";
              }
              format(string,sizeof(string),"%s(ID:%d) | Level:%d - %s\n\nTotal Admins Online: %i",adminname,i,level,AdmRank,count);
              ShowPlayerDialog(i,523,0,""white"Admins Online:",string,"OK","");
              count++;
           }
        }
        else if(count == 0)
        {
            ShowPlayerDialog(i,524,0,""white"Admins Online",""red"No Admins Online!","OK","");
        }
    }
    return 1;
}
Note:Give me the good answer or code in ZCMD Format not in strcmp

And Please Respond Fast
Reply


Messages In This Thread
I need help getting the admin online totals - by GAMER_PS2 - 21.10.2011, 11:41
Re: I need help getting the admin online totals - by JaTochNietDan - 21.10.2011, 11:46
Re: I need help getting the admin online totals - by GAMER_PS2 - 21.10.2011, 11:52
Re: I need help getting the admin online totals - by Ensconce - 21.10.2011, 12:55
Re: I need help getting the admin online totals - by MP2 - 21.10.2011, 13:30
Re: I need help getting the admin online totals - by JaTochNietDan - 21.10.2011, 13:52
Re: I need help getting the admin online totals - by MP2 - 21.10.2011, 14:12

Forum Jump:


Users browsing this thread: 1 Guest(s)