05.10.2013, 10:52
hello again , i want to ask about something my dialog /admins command
I want to appear all current admins while they are offline.
my enum uses :
thanks...
PHP код:
CMD:admins(playerid, params[])
{
new count = 1, name[126], string[126];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && PlayerInfo[i][pAdminLevel] != 0)
{
GetPlayerName(i, name, sizeof(name));
format(string, sizeof(string), "Online Adminstrators\n______________\n\n%s%s: %s\n", string, GetPlayerAdminRank(i), name);
count ++;
}
}
if(count > 0)
{
ShowPlayerDialog(playerid, 123, DIALOG_STYLE_MSGBOX, "{10B51E}Online Adminstrators", string, "OK", "");
}
else ShowPlayerDialog(playerid, 123, DIALOG_STYLE_MSGBOX, "{10B51E}Online Adminstrators", "{FAF5F5}No online admins", "OK", "");
return 1;
}
my enum uses :
Код:
PlayerInfo[playerid][pAdmin]