PHP код:
#define DIALOG_ADMINS 1
CMD:admins(playerid, params[])
{
new moneys1, string[256];
string="Name\tLevel\tFunction"
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if (PlayerInfo[i][AdminLevel] >=1 )//You can change with your admin system
{
moneys1 ++;
}
}
}
if (moneys1 != 0)
{
for (new i = 0; i < PLAYERS; i++)
{
if (IsPlayerConnected(i) && PlayerInfo[i][AdminLevel] >=1)
{
GetPlayerName(i, playername, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s\n%s\t%d\t%s", string, playername, PlayerInfo[i][AdminLevel]/*,here you can add function*/);
}
}
ShowPlayerDialog(playerid, DIALOG_ADMINS, DIALOG_STYLE_TABLIST_HEADERS, "Online Administrators", string, "Ok", "");
}
else
{
SendClientMessage(playerid, 0x006633FF, "{FFFFFF}No online staff members found.");
SendClientMessage(playerid, 0xFFCCE7FF, "");
}
return 1;
}