21.10.2015, 00:51
Alguйm pode me ajudar com meu /admins
so ta aparecendo 1 admin na dialog oque eu fis de errado?
so ta aparecendo 1 admin na dialog oque eu fis de errado?
PHP Code:
CMD:admins(playerid, params[])
{
new aadmin[128], s[128];
new IsAdmin;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerDados[i][Admin] > 0)
{
if(PlayerDados[i][Admin] == 1) NivelAdmin = "Iniciante";
if(PlayerDados[i][Admin] == 2) NivelAdmin = "Moderador";
if(PlayerDados[i][Admin] == 3) NivelAdmin = "Experiente";
if(PlayerDados[i][Admin] == 4) NivelAdmin = "Responsavel";
if(PlayerDados[i][Admin] == 5) NivelAdmin = "Chefe Geral";
IsAdmin ++;
format(aadmin,sizeof(aadmin), "{FFFF00}%s: {FFFFFF}%s\n",Nome(playerid),NivelAdmin);
strcat(aadmin, s);
}
ShowPlayerDialog(playerid, AdminOn, DIALOG_STYLE_LIST, "Administradores Online", aadmin, "X", "");
}
}
if(IsAdmin == 0)
{
format(Str,sizeof(Str), "Nenhum Administrador Online");
ShowPlayerDialog(playerid, AdminOff, DIALOG_STYLE_LIST, "Administradores(a)", Str, "X", "");
}
IsAdmin = 0;
return 1;
}