16.02.2019, 09:19
pawn Код:
CMD:admins(playerid)
{
new count=0, PlayerName[MAX_PLAYER_NAME], rankname[32],color[100];
new list1[900];
strcat(list1, "{FFFFFF}NO\t{FFFFFF}Name(ID)\t{FFFFFF}Level\n");
foreach(Player, i)
{
if(playerData[i][playerLevel] > 0)
{
GetPlayerName(i, PlayerName, sizeof(PlayerName));
switch(playerData[i][playerLevel])
{
case 1: { rankname = "{FFFFFF}LEVEL 1"; }
case 2: { rankname = "{FFFFFF}LEVEL 2"; }
case 3: { rankname = "{FFFFFF}LEVEL 3"; }
case 4: { rankname = "{FFFFFF}LEVEL 4"; }
case 5: { rankname = "{FFFFFF}LEVEL 5"; }
case 6: { rankname = "{FFFFFF}LEVEL 6"; }
case 7: { rankname = "{FFFFFF}LEVEL 7"; }
case 8: { rankname = "{FFFFFF}LEVEL 8"; }
}
if(playerData[i][playerAdminDuty] == true)
{
color = "{FF0770}"; // pink
}
else color = "{C0C0C0}"; //grey
format(list1, sizeof(list1), "%s\n%d\t%s%s(%d)\t%s\n", list1, count + 1,color, PlayerName, i, rankname);
count++;
}
if(count == 0)
{
SendClientMessage(playerid, -1, "There are no administrators online.");
return true;
}
ShowPlayerDialog(playerid, 555, DIALOG_STYLE_TABLIST_HEADERS, "Online Admins",list1, "Close", "");
}
return 1;
}
Please help.