07.01.2014, 13:26
pawn Код:
CMD:admins(playerid) {
new i, str[55], strDialog[500], Cont = 0, Nome[MAX_PLAYER_NAME];
for ( i = 0; i < MAX_PLAYERS; ++i) {
if ( IsPlayerConnected(i) && PlayerInfo[i][pAdmin] != 0 ) {
GetPlayerName(i, Nome, MAX_PLAYER_NAME);
format (str, sizeof str, "%s - Administrador nнvel %d\n", Nome, PlayerInfo[i][pAdmin] );
strcat(strDialog, str);
Cont++;
}
}
if ( Cont == 0)
ShowPlayerDialog(playerid, 9999, DIALOG_STYLE_MSGBOX, "Administradores online!", "Nгo hб administradores online!", "Fechar", #);
else
ShowPlayerDialog(playerid, 9999, DIALOG_STYLE_MSGBOX, "Administradores online!", strDialog, "Fechar", #);
return 1;
}