24.08.2011, 11:00
Untested:
pawn Code:
dcmd_admins(playerid,params[])
{
#pragma unused params
new string[MAX_PLAYER_NAME+8*15], stringb[MAX_PLAYER_NAME+8], amt;
if(IsPlayerAdmin(playerid) || Variables[playerid][Level] > 12)
{
foreach(Player, i)
{
if(Variables[i][Level] < 12 && Variables[i][Level] > 0)
{
format(stringb, sizeof stringb,"%s(%d)", RealName[i], Variables[i][Level] );
strcat(string, stringb, sizeof string);
amt++;
}
}
}
else
{
foreach(Player,i)
{
if(Variables[i][Level] < 12 && Variables[i][Level] > 0)
{
format(stringb,sizeof stringb,"%s", RealName[i] );
strcat(string, stringb, sizeof string);
amt++;
}
}
}
if(amt == 0) return SendClientMessage( playerid, MAIN_COLOR_2, "No admins are online.");
else return ShowPlayerDialog(playerid, 4557, DIALOG_STYLE_LIST, "Current Online Admins:", string, "OK", "Close");
}