21.10.2011, 13:30
pawn Код:
for(new i=0; i<GetMaxPlayers(); i++)
{
if(!IsPlayerConnected(i)) continue; // Not connected, continue
if(!pLevel[i]) continue; // Not admin, continue
if(!count) format(string, sizeof(string), "%s", pName[i]); // The first
else format(string, sizeof(string), "\n%s", pName[i]); // Not the first, start with \n
count++;
}
if(!count) return ShowPlayerDialog(.. no admins online ..); // No admins, display the 'no admins' dialog and stop the script there (return)
ShowPlayerDialog(playerid, dialogid, DIALOG_STYLE_LIST, "Admins Online:", string, "OK", ""); // Script carried on, show list of admins