20.07.2013, 23:26
pawn Код:
CMD:admins(playerid) {
new Contador, AdminList[SIZE];
for(new i = 0; i <= GetMaxPlayers(); i++) {
if(IsPlayerConnected(i) && PlayerInfo[i][Administrador] > 0) {
new LevelAdmin[30];
Contador++;
switch (PlayerInfo[i][Administrador]) {
case 1: LevelAdmin = "Moderador [Level:1]";
case 2: LevelAdmin = "Sub-Administrador [Level: 2]";
case 3: LevelAdmin = "Administrador [Level: 3]";
case 4: LevelAdmin = "Master [Level: 4]";
case 5: LevelAdmin = "Sub-Dono [Level: 5]";
case 6: LevelAdmin = "Dono [Level: 6]";
}
format( Celula, 128, "{FFFFFF} %s: %s %s", Jogador, LevelAdmin, (PlayerInfo[i][Trabalhando] == 1 ? ("[{FF0000}Trabalhando{FFFFFF}]") : PlayerInfo[i][Trabalhando] == 2 ? ("[{FFD700}Ausente{FFFFFF}]") : ("[{228B22}Jogando{FFFFFF}]")) );
strcat(AdminList, Celula);
}
}
if (Contador > 0 )
ShowPlayerDialog(playerid, 9999, DIALOG_STYLE_MSGBOX, "Admins Online", AdminList, "Fechar","");
else
ShowPlayerDialog(playerid, 9999, DIALOG_STYLE_MSGBOX, "Admins Online", "Nenhum administrador estб online!", "Fechar","");
return true;
}