04.12.2016, 11:55
Mesma coisa...
Continua sу aparecendo 1 admin. Quero que pegue todos os admins online.
Print:

Code atual:
Continua sу aparecendo 1 admin. Quero que pegue todos os admins online.
Print:

Code atual:
PHP код:
if(!strcmp(cmd, "/admins", true) || !strcmp(cmd, "/mods", true) || !strcmp(cmd, "/administradores", true) || !strcmp(cmd, "/moderadores", true))
{
new NickName[128];
new temadm;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(DOF2_GetInt(f(i), "AdminL") == 1)
{
if(aInfo[i][Oculto] == false)
{
GetPlayerName(i, NickName, 128);
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, 128);
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, 128);
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, 128);
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;
}
}