12.05.2018, 00:55
Tenta fazer o comando por dialog assim:
Obs: o dialog nгo vai aparecer se tiver tipo: Player[playerid][Gerente] = 1; й Player[playerid][Admin] = 1;
tiverem ao mesmo tempo!
PHP Code:
CMD:Admins(playerid)
{
new STR[250], AdminON, Counts;
for(new x = 0; x < MAX_PLAYERS; x++)
{
if(IsPlayerConnected(x))
{
new Aname[25];
GetPlayerName(x, Aname, 25);
if(Player_Informacoes[playerid][PlayerLevel] == 1)
{
format(STR, 1400, "{FFFFFF}%s {33AAFF}[ Administrador(a) ] {FF0000}[ %d ]\n", Aname, x);
AdminON++;
}
else if(Player_Informacoes[playerid][PlayerLevel] == 2)
{
format(STR, 1400, "{FFFFFF}%s {FFFF00}[ Gerente(a) ] {FF0000}[ %d ]\n", Aname, x);
AdminON++;
}
else if(Player_Informacoes[playerid][PlayerLevel] == 3)
{
format(STR, 1400, "{FFFFFF}%s {FF8000}[ Fundador(a) ] {FF0000}[ %d ]\n", Aname, x);
AdminON++;
}
Counts++;
}
if(AdminON == 0)
{
ShowPlayerDialog(playerid, 5000, DIALOG_STYLE_MSGBOX, "Administradores:", "{FF0000}Nбo hб administrador ( ADM ) online no momento!'", "Fechar", "");
}
else if(AdminON == 1)
{
ShowPlayerDialog(playerid, 5001, DIALOG_STYLE_LIST, "Administradores:", STR, "Fechar", "");
}
}
return 1;
}
tiverem ao mesmo tempo!