02.11.2017, 21:56
refiz de uma forma mais simples pra vocк.. se vocк esta tentando fazer o que eu acho que esta.. sua logica esta errada.
PHP код:
new
AdminRank_Name[5][32] =
{
{"Jogador"},
{"Ajudante"},
{"Administrador"},
{"Programador"}
};
CMD:administradores(playerid, params[])
{
new str[180], admin_count, admin_name[MAX_PLAYER_NAME];
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(Player[i][Administrador])
{
GetPlayerName(i, admin_name, MAX_PLAYER_NAME);
if(Player[i][conectado])
{
format(str, sizeof(str), "{FFFFFF}Nome\tNнvel\tStatus\n%s\t%s\tConectado", admin_name, AdminRank_Name[Player[i][Administrador]]);
}
else
{
format(str, sizeof(str), "{FFFFFF}Nome\tNнvel\tStatus\n%s\t%s\tOffline", admin_name, AdminRank_Name[Player[i][Administrador]]);
}
admin_count++;
}
}
if(!admin_count)
{
ShowPlayerDialog(playerid, DIALOG_NOADMIN, DIALOG_STYLE_MSGBOX, "{FF0000}Administradores", "{FF0000}Nгo hб administradores(a) online", "{FFFFFF}Fechar", ""
return true;
}
ShowPlayerDialog(playerid, DIALOG_ADMIN, DIALOG_STYLE_TABLIST_HEADERS, "{FF0000}Administradores", str, "{FFFFFF}Fechar", "");
return true;
}