29.06.2014, 15:43
Try This, with Ranks Names
pawn Код:
CMD:admins(playerid, params[])
{
new count = 0;
new AdminString[1500];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(PlayerInfo[i][Level] >= 1)
{
if(IsPlayerAdmin(i))
{
AdmRank = "{FF0000}RCON {FFFFFF}Administrator";
}
else
{
switch(PlayerInfo[i][Level])
{
case 1:
{
AdmRank = "{DF0101}Trial Administrator";
}
case 2:
{
AdmRank = "{0040FF}Server Administrator";
}
case 3:
{
AdmRank = "{BFFF00}Senior Administrator";
}
case 4:
{
AdmRank = "{58FAF4}Server Manager";
}
case 5:
{
AdmRank = "{FFDE00}Server CO OWner";
}
case 6:
{
AdmRank = "{FFDE00}Server Owner";
}
}
}
format(AdminString, sizeof(AdminString), "%s{FFFFFF}Level: %d - %s ID:%i | %s \n",AdminString, PlayerInfo[i][Level], GetName(i),i,AdmRank);
ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "Online Admins", AdminString, "Ok", "");
count++;
}
}
}
if (count == 0)
{
ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "Online Admins", "No online admins", "Ok", "");
}
return 1;
}