21.10.2011, 11:41
I need help getting admin online totals on my /admins
here is the code
Note:Give me the good answer or code in ZCMD Format not in strcmp
And Please Respond Fast
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;
}
And Please Respond Fast