[Ajuda] comando /admins onlines
#1

Bom pessoal minha gm tem o comando /admins para ver os admins onlines mas quando ha mais de 4 ou cinco adm's pra cima a dialog buga ja peguei varios codigos da msm natureza mais ainda fica bugado. O comando й esse:

PHP код:
    if(strcmp(cmd"/admins"true) == 0)
    {
        new 
count 0;
        new 
strcmd[1000];
        for(new 
0MAX_PLAYERSi++)
        {
            
format(Afilesizeof(Afile), PASTA_ADMINSGetPlayerNameEx(i));
            if(
DOF2_GetInt(Afile"Level") > 1)
            {
                if(
DOF2_GetInt(Afile"ALevel") == 1)
                {
                    if(
AFK[playerid] == 0)
                    {
                        
format(strcmdsizeof(strcmd), "{FFFFFF}%s [%d]\t{00FF00}[ AJUDANTE™ ]\t\t{00FF00}[ ON ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                    else
                    {
                        
format(strcmdsizeof(strcmd), "{FFFFFF}%s [%d]\t{00FF00}[ AJUDANTE™ ]\t\t{FF0000}[ OFF ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                }
                if(
DOF2_GetInt(Afile"ALevel") == 2)
                {
                    if(
AFK[playerid] == 0)
                    {
                        
format(strcmdsizeof(strcmd), "{FFFFFF}%s [%d]\t{00FF00}[ ADMINISTRADOR™ ]\t\t{00FF00}[ ON ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                    else
                    {
                        
format(strcmdsizeof(strcmd), "{FFFFFF}%s [%d]\t{00FF00}[ ADMINISTRADOR™ ]\t\t{FF0000}[ OFF ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                }
                if(
DOF2_GetInt(Afile"ALevel") == 3)
                {
                    if(
AFK[playerid] == 0)
                    {
                        
format(strcmdsizeof(strcmd), "{FFFFFF}%s [%d]\t{00FF00}[ GERENTE™ ]\t\t{00FF00}[ ON ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                    else
                    {
                        
format(strcmdsizeof(strcmd), "{FFFFFF}%s [%d]\t{00FF00}[ GERENTE™ ]\t\t{FF0000}[ OFF ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                }
                if(
DOF2_GetInt(Afile"ALevel") == 4)
                {
                    if(
AFK[playerid] == 0)
                    {
                        
format(strcmdsizeof(strcmd), "{FFFFFF}%s [%d]\t{00FF00}[ SUB-DONO™ ]\t\t{00FF00}[ ON ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                    else
                    {
                        
format(strcmdsizeof(strcmd), "{FFFFFF}%s [%d]\t{00FF00}[ SUB-DONO™ ]\t\t{FF0000}[ OFF ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                }
                if(
DOF2_GetInt(Afile"ALevel") == 5)
                {
                    if(
AFK[playerid] == 0)
                    {
                        
format(strcmdsizeof(strcmd), "{FFFFFF}%s [%d]\t{00FF00}[ DONO™ ]\t\t{00FF00}[ ON ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                    else
                    {
                        
format(strcmdsizeof(strcmd), "{FFFFFF}%s [%d]\t{00FF00}[ DONO™ ]\t\t{FF0000}[ OFF ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                }
                if(
DOF2_GetInt(Afile"ALevel") == 6)
                {
                    if(
AFK[playerid] == 0)
                    {
                        
format(strcmdsizeof(strcmd), "{FFFFFF}%s [%d]\t{00FF00}[ SCRIPTER™ ]\t\t{00FF00}[ ON ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                    else
                    {
                        
format(strcmdsizeof(strcmd), "{FFFFFF}%s [%d]\t{00FF00}[ SCRIPTER™ ]\t\t{FF0000}[ OFF ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                }
                if(
DOF2_GetInt(Afile"ALevel") == 7)
                {
                    if(
AFK[playerid] == 0)
                    {
                        
format(strcmdsizeof(strcmd), "{FFFFFF}%s [%d]\t{00FF00}[ MAPPER™ ]\t\t{00FF00}[ ON ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                    else
                    {
                        
format(strcmdsizeof(strcmd), "{FFFFFF}%s [%d]\t{00FF00}[ MAPPER™ ]\t\t{FF0000}[ OFF ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                }
                
count++;
            }
        }
        if(
count == 0)
        {
            
ShowPlayerDialog(playeridplayersimpDIALOG_STYLE_MSGBOX"{FFFFFF}ADM's Online [ {FF0000}0{FFFFFF} ]""{FF0000}Nгo hб menbros da Administraзгo Online""OK""");
        }
        else
        {
            new 
msg[150], strcount[150];
            
format(msgsizeof(msg), "{FFFFFF}ADM's Online [ {00FF00}%d{FFFFFF} ]"count);
            
strcat(strcountmsgsizeof(strcount));
            
ShowPlayerDialog(playeridplayersimpDIALOG_STYLE_MSGBOXstrcountstring"OK""");
        }
        return 
1;
    } 
para vcs terem como base. Se tiverem alguma forma de aperfeiзoar eu agradeзo
Reply


Messages In This Thread
comando /admins onlines - by Arleann - 23.12.2018, 01:49
Re: comando /admins onlines - by MrToddyYT - 23.12.2018, 02:00
Re: comando /admins onlines - by Arleann - 23.12.2018, 02:02
Re: comando /admins onlines - by bruxo00 - 23.12.2018, 02:14

Forum Jump:


Users browsing this thread: 2 Guest(s)