01.12.2015, 16:02
My problem with this codes is its only show only 1 admin even there is 3 admins online :
PHP код:
CMD:admins(playerid, params[])
{
new count = 0, string[256],AdmRank[500];
for(new i = 0; i < MAX_PLAYERS; i++)
if(PlayerInfo[i][Level] == 1)
{
AdmRank = "Trial Admin";
}
else if(PlayerInfo[i][Level] == 2)
{
AdmRank = "Server Admin";
}
else if(PlayerInfo[i][Level] == 3)
{
AdmRank = "Senior Admin";
}
else if(PlayerInfo[i][Level] == 4)
{
AdmRank = "Lead Admin";
}
else if(PlayerInfo[i][Level] == 5)
{
AdmRank = "Global Admin";
}
else if(PlayerInfo[i][Level] == 6)
{
AdmRank = "Developer";
}
else if(PlayerInfo[i][Level] == 7)
{
AdmRank = "Co Owner";
}
else if(PlayerInfo[i][Level] == 8)
{
AdmRank = "Owner";
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(PlayerInfo[i][Level] > 0)
{
new Name[MAX_PLAYER_NAME];
GetPlayerName(i,Name,sizeof(Name));
{
format(string, sizeof(string), ""cwhite"Level: "cgreen"%d "cwhite"| "cwhite"Name:"cgreen" %s "cwhite"(ID:"cgreen"%i"cwhite") | Rank : "cgreen"%s", PlayerInfo[i][Level], Name, i,AdmRank);
ShowPlayerDialog(playerid,2312,DIALOG_STYLE_MSGBOX,"Admins Online",string,"OK","");
count++;
}
}
}
}
if (count == 0) ShowPlayerDialog(playerid,2322,DIALOG_STYLE_MSGBOX,"Admins Online","{FF0000}No Admins online right now","OK","");
return 1;
}