[Ajuda] /admins em dialog
#1

Bom pessoal eu criei esse sistema de ver os adm's onlines em dialog, mas na dialog quando a 6 ou mais adm's online so aparece 5 na dialog alguem sabe pq isso acontece?

PHP код:

    
if(strcmp(cmd"/admins"true) == 0)
    {
        new 
count 0;
        new 
strcmd[1000];
        for(new 
0MAX_PLAYERSi++)
        {
            if(
IsPlayerConnected(i))
            {
                
format(filesizeof(file), PASTA_ADMINSGetPlayerNameEx(i));
                if(
dini_Int(file"ALevel") == 7)
                {
                    if(
AFK[i] == 0)
                    {
                        
format(strcmdsizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ DONO™ ]\t\t{00FF00}[ ON ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                    else
                    {
                        
format(strcmdsizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ DONO™ ]\t\t{FF0000}[ OFF ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                }
                else if(
dini_Int(file"ALevel") == 6)
                {
                    if(
AFK[i] == 0)
                    {
                        
format(strcmdsizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ SUB - DONO™ ]\t\t{00FF00}[ ON ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                    else
                    {
                        
format(strcmdsizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ SUB - DONO™ ]\t\t{FF0000}[ OFF ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                }
                else if(
dini_Int(file"ALevel") == 5)
                {
                    if(
AFK[i] == 0)
                    {
                        
format(strcmdsizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ GERENTE™ ]\t\t{00FF00}[ ON ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                    else
                    {
                        
format(strcmdsizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ GERENTE™ ]\t\t{FF0000}[ OFF ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                }
                else if(
dini_Int(file"ALevel") == 4)
                {
                    if(
AFK[i] == 0)
                    {
                        
format(strcmdsizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ ADMINISTRADOR™ ]\t\t{00FF00}[ ON ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                    else
                    {
                        
format(strcmdsizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ ADMINISTRADOR™ ]\t\t{FF0000}[ OFF ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                }
                else if(
dini_Int(file"ALevel") == 3)
                {
                    if(
AFK[i] == 0)
                    {
                        
format(strcmdsizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ SUB - ADMINISTRADOR™ ]\t\t{00FF00}[ ON ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                    else
                    {
                        
format(strcmdsizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ SUB - ADMINISTRADOR™ ]\t\t{FF0000}[ OFF ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                }
                else if(
dini_Int(file"ALevel") == 2)
                {
                    if(
AFK[i] == 0)
                    {
                        
format(strcmdsizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ AJUDANTE™ ]\t\t{00FF00}[ ON ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                    else
                    {
                        
format(strcmdsizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ AJUDANTE™ ]\t\t{FF0000}[ OFF ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                }
                else if(
dini_Int(file"ALevel") == 1)
                {
                    if(
AFK[i] == 0)
                    {
                        
format(strcmdsizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ AUXILIAR™ ]\t\t{00FF00}[ ON ]\n"GetPlayerNameEx(i), i);
                        
strcat(stringstrcmdsizeof(string));
                    }
                    else
                    {
                        
format(strcmdsizeof(strcmd), "{828282}%s [ %d ]\t\t{00FF00}[ AUXILIAR™ ]\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[1000];
            
format(msgsizeof(msg), "{FFFFFF}ADM's Online [ {00FF00}%d{FFFFFF} ]"count);
            
strcat(strcountmsgsizeof(strcount));
            
ShowPlayerDialog(playeridplayersimpDIALOG_STYLE_MSGBOXstrcountstring"OK""");
        }
        return 
1;
    } 
Agradeзo a ajuda. Obrigado pela atenзгo.

================================================== ======

"Ainda vou ver muita gente se arrependendo pelo que me fez e falou. Hoje vocк me pisa,
amanhг eu te atropelo..."


Brasil Virtual World™ ® RPG: 192.95.23.88:7777
Reply
#2

Testa ai pra ver se funciona

Код:
if(strcmp(cmd, "/admins", true) == 0) 
    { 
        new count=0, strcmd[128], int_val, cargo[27], pstate[9], strdest[500];

        for(new j=GetPlayerPoolSize(),i; i!=j; ++i)
        { 
            if(IsPlayerConnected(i)) 
            { 
                format(file, sizeof(file), PASTA_ADMINS, GetPlayerNameEx(i));

                if(!fexist(file))
                	continue;

                count++;
                
                int_val = dini_Int(file, "ALevel");

                switch(int_val) {

                case 1:cargo="[ AUXILIAR™ ]";
                case 2:cargo="[ AJUDANTE™ ]";
                case 3:cargo="[ SUB - ADMINISTRADOR™ ]";
                case 4:cargo="[ ADMINISTRADOR™ ]";
                case 5:cargo="[ GERENTE™ ]";
                case 6:cargo="[ SUB - DONO™ ]";
                case 7:cargo="[ DONO™ ]";
            	}
                pstate=((AFK[i]==0)?("[ OFF ]"):("[ ON ]"));

                format(strcmd, sizeof strcmd, "{828282}%s [ %d ]\t\t{00FF00}%s\t\t{00FF00}%s", GetPlayerNameEx(i), i,cargo, pstate);
           		strcat(strdest, strcmd, sizeof strdest);
             
            } 
        } 
        if(!count) 
        { 
            ShowPlayerDialog(playerid, playersimp, DIALOG_STYLE_MSGBOX, "{FFFFFF}ADM's Online [ {FF0000}0{FFFFFF} ]", "{FF0000}Nгo hб menbros da Administraзгo Online", "OK", ""); 
        } 
        else 
        { 
            new msg[50];
            format(msg, sizeof(msg), "{FFFFFF}ADM's Online [ {00FF00}%d{FFFFFF} ]", count); 
        
            ShowPlayerDialog(playerid, playersimp, DIALOG_STYLE_MSGBOX, msg, strdest, "OK", ""); 
        } 
        return 1; 
    }
Reply
#3

Quote:
Originally Posted by DarkBr
Посмотреть сообщение
Testa ai pra ver se funciona

Код:
if(strcmp(cmd, "/admins", true) == 0) 
    { 
        new count=0, strcmd[128], int_val, cargo[27], pstate[9], strdest[500];

        for(new j=GetPlayerPoolSize(),i; i!=j; ++i)
        { 
            if(IsPlayerConnected(i)) 
            { 
                format(file, sizeof(file), PASTA_ADMINS, GetPlayerNameEx(i));

                if(!fexist(file))
                	continue;

                count++;
                
                int_val = dini_Int(file, "ALevel");

                switch(int_val) {

                case 1:cargo="[ AUXILIAR™ ]";
                case 2:cargo="[ AJUDANTE™ ]";
                case 3:cargo="[ SUB - ADMINISTRADOR™ ]";
                case 4:cargo="[ ADMINISTRADOR™ ]";
                case 5:cargo="[ GERENTE™ ]";
                case 6:cargo="[ SUB - DONO™ ]";
                case 7:cargo="[ DONO™ ]";
            	}
                pstate=((AFK[i]==0)?("[ OFF ]"):("[ ON ]"));

                format(strcmd, sizeof strcmd, "{828282}%s [ %d ]\t\t{00FF00}%s\t\t{00FF00}%s", GetPlayerNameEx(i), i,cargo, pstate);
           		strcat(strdest, strcmd, sizeof strdest);
             
            } 
        } 
        if(!count) 
        { 
            ShowPlayerDialog(playerid, playersimp, DIALOG_STYLE_MSGBOX, "{FFFFFF}ADM's Online [ {FF0000}0{FFFFFF} ]", "{FF0000}Nгo hб menbros da Administraзгo Online", "OK", ""); 
        } 
        else 
        { 
            new msg[50];
            format(msg, sizeof(msg), "{FFFFFF}ADM's Online [ {00FF00}%d{FFFFFF} ]", count); 
        
            ShowPlayerDialog(playerid, playersimp, DIALOG_STYLE_MSGBOX, msg, strdest, "OK", ""); 
        } 
        return 1; 
    }
deu esse erro:

Код:
C:\Users\ARLEAN\Desktop\Brasil Virtual World\gamemodes\B.V.W.pwn(14487) : error 017: undefined symbol "GetPlayerPoolSize"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)