[Ajuda] problema na dialog
#1

essa dialog so esta pegando meu nome nao pega de quem tem o level ou kill ou dinheiro ou maior level de procurado
sу pega o meu alguem ajuda ae

PHP код:
     if(dialogid == 9999)
{
    if(
response//Ao Clickar no primeiro botгo
    
{
            if(
listitem == 0//Kills
{
    new 
string[128], name[24];
    for ( new 
0MAX_PLAYERSi++ )
       {
        if(
topKill Player[i][pMatou]) {
            
topKill Player[i][pMatou];
            
GetPlayerName(playeridnamesizeof(name));
            
format(stringsizeof(string), " {00FF00}%s{FF5A00} | Kills: %i",nametopKill);
        }
    }
    
ShowPlayerDialog(playeridD_RankDIALOG_STYLE_MSGBOX,"{ff0000}» {ffffff} Rei dos Kills ",string,"ok","Voltar");
    return 
1;
}
            if(
listitem == 1// Score
            
{
                new 
string[128], info[2048], name[24];
                for ( new 
0MAX_PLAYERSi++ )
                
GetPlayerName(playeridname24);
                
format(stringsizeof(string), " {00FF00}%s{FF5A00} | score: %i",nameGetPlayerScore(playerid));
                
strcat(infostring);
                
ShowPlayerDialog(playeridD_Rank+1DIALOG_STYLE_MSGBOX,"{ff0000}» {ffffff} Rei dos Scores ",info,"ok","Voltar");
                return 
1;
            }
            if(
listitem == 2//Money
            
{
                new 
string[128], info[2048], name[24];
                for ( new 
0MAX_PLAYERSi++ )
                
GetPlayerName(playeridname24);
                
format(stringsizeof(string), " {00FF00}%s{FF5A00} | Dinheiro: %i",nameGetPlayerMoney(playerid));
                
strcat(infostring);
                
ShowPlayerDialog(playeridD_Rank+2DIALOG_STYLE_MSGBOX,"{ff0000}» {ffffff} Rei dos Scores ",info,"ok","Voltar");
                return 
1;
            }
            if(
listitem == 3//Mais Procurado
            
{
                new 
string[128], info[2048], name[24];
                for ( new 
0MAX_PLAYERSi++ )
                
GetPlayerName(playeridname24);
                
format(stringsizeof(string), " {00FF00}%s{FF5A00} | Nivel de procurado: %i",nameGetPlayerWantedLevel(playerid));
                
strcat(infostring);
                
ShowPlayerDialog(playeridD_Rank+3DIALOG_STYLE_MSGBOX,"{ff0000}» {ffffff} Rei dos Scores ",info,"ok","Voltar");
                return 
1;
              }
        }
    } 
Reply
#2

Alguem ??
Reply
#3

O seu cуdigo nгo й um ranking, mas irб mostrar tds as informaзoes dos players:

Comando:
PHP код:
CMD:infos(playerid)
{
    
ShowPlayerDialog(playerid9999DIALOG_STYLE_LIST"Escolha:""Kills\nScore\nProcurados""Ok""Fechar");
    return 
true;

OnDialogResponse:
PHP код:
    if(dialogid == 9999)
    {
        if(
response)
        {
            new 
str[95];
            
            if(
listitem == 0) {
                for(new 
i<= GetPlayerPoolSize(); ++) {
                    if(
IsPlayerConnected(i)) {
                        
format(strsizeof str"%s{00FF00}%s {FF5A00}| Kills: %d\n"strGetName(i), Player[i][pMatou]);
                    }
                }
                
ShowPlayerDialog(playeridD_Rank+1DIALOG_STYLE_MSGBOX"{FF0000}» {FFFFFF}Rei dos Kills"str"Fechar""");
            }
            if(
listitem == 1) {
                for(new 
i<= GetPlayerPoolSize(); ++) {
                    if(
IsPlayerConnected(i)) {
                        
format(strsizeof str"%s{00FF00}%s {FF5A00}| Score: %d\n"strGetName(i), GetPlayerScore(i));
                    }
                }
                
ShowPlayerDialog(playeridD_Rank+2DIALOG_STYLE_MSGBOX"{FF0000}» {FFFFFF}Rei dos Scores"str"Fechar""");
            }
            if(
listitem == 2) {
                for(new 
i<= GetPlayerPoolSize(); ++) {
                    if(
IsPlayerConnected(i)) {
                        
format(strsizeof str"%s{00FF00}%s{FF5A00} | Nivel de procurado: %d\n"strGetName(i), GetPlayerWantedLevel(i));
                    }
                }
                
ShowPlayerDialog(playeridD_Rank+3DIALOG_STYLE_MSGBOX"{FF0000}» {FFFFFF}Mais Procurado"str"Fechar""");
            }
        }
    } 
Stock:
PHP код:
GetName(playerid) {
    static 
nickplayer[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnickplayersizeof nickplayer);
    return 
nickplayer;

Reply
#4

Pq n e um rank tem como transformar em um ?
Reply
#5

em pq isso n e um rank oq fiz de errado pode ajudar ??
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)