10.04.2014, 01:48
Basically when you do this command IG, it only shows one admin online (yourself) and there is always more then that.. I need it to show ALL of the administrators.
pawn Код:
CMD:admins(playerid, params[])
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
foreach(Player, i)
{
if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] <= PlayerInfo[playerid][pAdmin])
{
new string[128];
if(PlayerInfo[i][pAdminDuty] == 1) { format(string, sizeof(string), "%s: {00FF00}%s", GetPlayerAdminLevel(i), GetPlayerNameEx(i)); }
if(PlayerInfo[i][pAdminDuty] == 0) { format(string, sizeof(string), "%s: {FF0000}%s", GetPlayerAdminLevel(i), GetPlayerNameEx(i)); }
ShowPlayerDialog(playerid, 4458, DIALOG_STYLE_MSGBOX, "Online Admins", string, "Okay", "");
return 1;
}
}
}
else
{
SendClientMessageEx(playerid, COLOR_GRAD1, "Have questions? Ask on /n chat.");
SendClientMessageEx(playerid, COLOR_GRAD1, "If you need to report about something, type /report [id] [reason].");
}
return 1;
}