12.01.2017, 20:25
pawn Код:
COMMAND:admins(playerid) {
new str[250], admname[40], status[15], nome[21], count = 0;
for(new i = 0; i < GetPlayerPoolSize(); i++) {
if(PlayerInfo[i][Administrador] > 0) {
switch(PlayerInfo[i][Administrador]) {
case 1: admname = "Moderador [Level: 1]";
case 2: admname = "Administrador [Level: 2]";
case 3: admname = "Administrador - Master[Level: 2]";
case 4: admname = "Administrador - Sub-Dono [Level: 2]";
case 5: admname = "Administrador - Dono [Level: 2]";
}
switch(PlayerInfo[i][Trabalhando]) {
case 0: status = "Jogando";
case 1: status = "Trabalhando";
case 2: status = "Ausente ";
}
}
count ++;
GetPlayerName(i, nome, 21);
format(str, sizeof(str), "%s [%i] %s {eb6565}(%s)\n", nome, i, admname, status);
}
if(count == 0)
format(str, sizeof(str), "Nenhum admin online");
ShowPlayerDialog(playerid, 1443, DIALOG_STYLE_MSGBOX, "Administradores online:", str, "Fechar", "");
return true;
}