05.06.2018, 01:09
Code:
if(strcmp(cmd, "/AdminsTeste", true) == 0) { new CargoAdmin[80]; new StatusOnline[80]; new StringCat[1000]; new String[1000]; new ContarAdmins; for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if( aInfo[ i ][ Ajudante ] ) CargoAdmin = "{00FF00}Ajudante"; if( aInfo[ i ][ Moderador ] ) CargoAdmin = "{00FF00}Moderador"; if( aInfo[ i ][ Admin ] ) CargoAdmin = "{00FF00}Administrador"; if( pInfo[ i ][ AFK ] == 0 ) StatusOnline = "{00CD00}Online"; if( pInfo[ i ][ AFK ] == 1 ) StatusOnline = "{FF0000}Ausente"; format(String, sizeof(String), "{1E90FF}%s {FFFFFF}[ %s {FFFFFF}] [ %s {FFFFFF}]\n", PlayerName( i ) , CargoAdmin, StatusOnline); strcat(StringCat, String); ContarAdmins++; } } if(ContarAdmins == 0) { ShowPlayerDialog(playerid, DIALOG_MENSAGEM, DIALOG_STYLE_MSGBOX, "{FF0000}0 {FFFFFF}Admins Online", "{FF0000}Não tem Administradores online!", "Fechar", ""); } else if(ContarAdmins == 1) { format(String, sizeof(String), "{00FF00}1 {FFFFFF}Admin Online", ContarAdmins); ShowPlayerDialog(playerid, DIALOG_MENSAGEM, DIALOG_STYLE_MSGBOX, String, StringCat, "Fechar", ""); } else { format(String, sizeof(String), "{00FF00}%d {FFFFFF}Admins Online", ContarAdmins); ShowPlayerDialog(playerid, DIALOG_MENSAGEM, DIALOG_STYLE_MSGBOX, String, StringCat, "Fechar", ""); } return 1; }
Code:
if( pInfo[ i ][ AFK ] == 0 ) StatusOnline = "{00CD00}Online"; if( pInfo[ i ][ AFK ] == 1 ) StatusOnline = "{FF0000}Ausente";