03.12.2016, 22:16
Bom, estou desenvolvendo um /admins em dialog mas nгo consigo :/
Se tiver 1 admin online no servidor, aparece o dialog de boa. Mas se tiver mais de um, o dialog nгo aparece.
Quem me ajudar, dou +REP
Obrigado.
Obs: Eu entrei em 2 contas usando o SandBoxie.
Print(se quiser):

CODE:
Se tiver 1 admin online no servidor, aparece o dialog de boa. Mas se tiver mais de um, o dialog nгo aparece.
Quem me ajudar, dou +REP

Obrigado.
Obs: Eu entrei em 2 contas usando o SandBoxie.
Print(se quiser):

CODE:
PHP код:
if(!strcmp(cmd, "/admins", true) || !strcmp(cmd, "/mods", true) || !strcmp(cmd, "/administradores", true) || !strcmp(cmd, "/moderadores", true))
{
new NickName[25];
new temadm;
foreach(Player, i)
{
if(DOF2_GetInt(f(i), "AdminL") == 1)
{
if(aInfo[i][Oculto] == false)
{
GetPlayerName(i, NickName, 25);
temadm ++;
format(string, sizeof(string), "~ %s [ID:%d] {1E90FF}Dono", NickName, i);
}
}
if(aInfo[i][Admin] == 1 && DOF2_GetInt(f(i), "AdminL") == 0)
{
if(aInfo[i][Oculto] == false)
{
GetPlayerName(i, NickName, 25);
temadm ++;
format(string, sizeof(string), "~ %s [ID:%d] {1E90FF}Administrador", NickName, i);
}
}
if(aInfo[i][Moderador] == 1 && DOF2_GetInt(f(i), "AdminL") == 0)
{
if(aInfo[i][Oculto] == false)
{
GetPlayerName(i, NickName, 25);
temadm ++;
format(string, sizeof(string), "~ %s [ID:%d] {00FF7F}Moderador", NickName, i);
}
}
if(aInfo[i][Ajudante] == 1 && DOF2_GetInt(f(i), "AdminL") == 0)
{
if(aInfo[i][Oculto] == false)
{
GetPlayerName(i, NickName, 25);
temadm ++;
format(string, sizeof(string), "~ %s [ID:%d] {FFA500}Ajudante", NickName, i);
}
}
}
if(temadm == 1){
ShowPlayerDialog(playerid, ADMINSD, DIALOG_STYLE_MSGBOX, "{FFFFFF}Administradores online:", string, "Fechar", "");
return 1;
}
if(temadm == 1) return ShowPlayerDialog(playerid, ADMINSD, DIALOG_STYLE_MSGBOX, "{FFFFFF}Administradores online:", "{FF0000}Nгo hб membros da Administraзгo online no momento'", "Fechar", "");
return 1;
}