04.02.2013, 03:00
Ele estб mostrando apenas 1 admin na lista, apenas o com o id superior.
Cуdigo:
Creditos a: JFS - Pelo script
Cуdigo:
pawn Код:
CMD:admins(playerid, params[])
{
new IsAdmin;
//SendClientMessage(playerid, ROSA, "Admin Online:");
new Online[10];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i)) {
if(PlayerDados[i][Admin] > 0)
{
if(PlayerDados[i][Escondido] == false) {
if(PlayerDados[i][Admin] == 1) AdminNivel = "Moderador";
if(PlayerDados[i][Admin] == 2) AdminNivel = "Admin Iniciante";
if(PlayerDados[i][Admin] == 3) AdminNivel = "Admin Geral";
if(PlayerDados[i][Admin] == 4) AdminNivel = "Sub Dono";
if(PlayerDados[i][Admin] == 5) AdminNivel = "Poderoso Chefгo";
if(PlayerDados[i][Trabalhando] == true) AdminTrabalhando = "Trabalhando";
if(PlayerDados[i][Trabalhando] == false) AdminTrabalhando = "Jogando";
if(PlayerDados[i][Afk] == true) Online = "AFK";
if(PlayerDados[i][Afk] == false) Online = "Online";
format(String, sizeof(String), "{FF0000}Administradores online:\n\n{FFFFFF}%s | %s | %s | %s\n\n", Nome(i), AdminNivel, AdminTrabalhando, Online);
//SendClientMessage(playerid, LARANJA, String);
ShowPlayerDialog(playerid, DIALOG_ADMSON, DIALOG_STYLE_MSGBOX, "Admins Online", String, "Fechar", "");
IsAdmin ++;
}
}
}
}
if(IsAdmin == 0)
{
//SendClientMessage(playerid, CINZA, "Nenhum Admin Online!");
GameTextForPlayer(playerid, "~r~Nenhum admin online ~w~!", 5000, 3);
}
IsAdmin = 0;
//SendClientMessage(playerid, CINZA, "Use /helpers");
return 1;
}