[Ajuda] Comando /admins
#1

Estou tendo um problema com o comando /admins, simplesmente mostra 1 administrador, nгo aparece os demais !


PHP Code:
CMD:admins(playeridparams[])
{
    new 
count 0;
    { 
        if(
jInfo[playerid][Logado] == true)
        {
            
            for (new 
0MAX_PLAYERSi++)
            {
                if(
IsPlayerConnected(i))
                {
                    if(
jInfo[i][Cargo] > 0)
                    {
                        new 
StrAdmins[1000];
                        new 
Str1[128];
                        
format(Strsizeof(Str), "{FFFFFF}Administrador Online no Momento !\n");
                        
format(Str1sizeof(Str1), "{FFFFFF}[ %s {FFFFFF}] {FF8000}%s (%d) {FFFFFF}estб {00FF00}Online\n"LevelAdmin[jInfo[i][Cargo]], jNome(i), i); 
                        
strcat(StrAdminsStr1000);
                        
strcat(StrAdminsStr11000);
                        
ShowPlayerDialog(playeridDAdminsOnlineDIALOG_STYLE_MSGBOX"{FFA500}Administradores"StrAdmins"Fechar""");
                        
count++;
                    }
                }
            }
        }
        if(
count == 0)
        {
            
format(Strsizeof(Str), "{FF0000}Nenhum administrador Online no momento !");
            
ShowPlayerDialog(playeridDAdminsOnlineDIALOG_STYLE_MSGBOX"{FFA500}Administradores"Str"Fechar""");
        }
    }
    return 
1;

Screenshoot

https://prnt.sc/jdtaac
Reply
#2

PHP Code:
CMD:admins(playerid)
{
    new 
count 0StrAdmins[1000], str[120];
    if(
jInfo[playerid][Logado] == false) return 1;
    for (new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            if(
jInfo[i][Cargo] > 0)
            {
                
format(strsizeof(str), "{FFFFFF}[ %s {FFFFFF}] {FF8000}%s (%d) {FFFFFF}estб {00FF00}Online\n"LevelAdmin[jInfo[i][Cargo]], jNome(i), i);
                
strcat(StrAdminsstr);
                
count++;
            }
        }
    }
    if(
count == 0)
    {
        
format(strsizeof(str), "{FF0000}Nenhum administrador Online no momento !");
        
ShowPlayerDialog(playeridDAdminsOnlineDIALOG_STYLE_MSGBOX"{FFA500}Administradores"str"Fechar""");
        return 
1;
    }
    
ShowPlayerDialog(playeridDAdminsOnlineDIALOG_STYLE_MSGBOX"{FFA500}Administradores"StrAdmins"Fechar""");
    return 
1;

Reply
#3

Quote:
Originally Posted by humildadeforever
View Post
PHP Code:
CMD:admins(playerid)
{
    new 
count 0StrAdmins[1000], str[120];
    if(
jInfo[playerid][Logado] == false) return 1;
    for (new 
0MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            if(
jInfo[i][Cargo] > 0)
            {
                
format(strsizeof(str), "{FFFFFF}[ %s {FFFFFF}] {FF8000}%s (%d) {FFFFFF}estб {00FF00}Online\n"LevelAdmin[jInfo[i][Cargo]], jNome(i), i);
                
strcat(StrAdminsstr);
                
count++;
            }
        }
    }
    if(
count == 0)
    {
        
format(strsizeof(str), "{FF0000}Nenhum administrador Online no momento !");
        
ShowPlayerDialog(playeridDAdminsOnlineDIALOG_STYLE_MSGBOX"{FFA500}Administradores"str"Fechar""");
        return 
1;
    }
    
ShowPlayerDialog(playeridDAdminsOnlineDIALOG_STYLE_MSGBOX"{FFA500}Administradores"StrAdmins"Fechar""");
    return 
1;

Obrigadгo, Funcionou !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)