17.04.2015, 17:44
pawn Код:
GetAdminRank(playerid)
{
new rank[24];
switch(PlayerInfo[playerid][pAdmin])
{
case 1: rank = "Administrбtor";
case 2: rank = "Globбlnн Administrбtor";
case 3: rank = "Hlavnн Administrбtor";
case 4: rank = "Zakladatel";
default: rank = "Unknown Rank";
}
return rank;
}
CMD:admins(playerid, params[])
{
static str[3000 char], packed[64 char], szStr[64];
str{0} = EOS;
foreach(new i : Player)
{
if(0 < PlayerInfo[i][pAdmin] < 5)
{
format(szStr, sizeof(szStr), "{FFFFFF}%s -> %s\n", GetName(i), GetAdminRank(i));
strpack(packed, szStr);
strcat(str, packed);
}
}
if(!str{0}) SendClientMessage(playerid,-1,"No Admins OnLine");
else ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_MSGBOX, "Online Administrбtoři", str, "Ok", "");
return 1;
}