SA-MP Forums Archive
[Ajuda] Ranking bugado - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] Ranking bugado (/showthread.php?tid=565021)



Ranking bugado - best95 - 24.02.2015

@REMOVIDO


Re: Ranking bugado - #Luca[S]. - 24.02.2015

Todas as contas que vocк criou, tem a mesma quantidade de score?


Re: Ranking bugado - best95 - 24.02.2015

nгo eu crio uma conta e a conta do outro player que estava em primeiro some e fica a minha entendeu? some ao invez de ir pra segundo ou ficar em primeiro dependendo do score que a conta nova fizer.


Re: Ranking bugado - #Luca[S]. - 24.02.2015

@EDIT Agora entendi!

@EDIT2

Tente
PHP код:
@_CallBackMostrarRankPlayer(playerid)
{
    new
        
playerScores[MAX_PLAYERS][rankingEnum],
        
index
    
;
    for(new 
i!= MAX_PLAYERS; ++i)
    {
        if(
IsPlayerConnected(i) && !IsPlayerNPC(i))
        {
            
playerScores[index][player_Score] = GetPlayerScore(i);
            
playerScores[index++][player_ID] = i;
        }
    }
    
GetPlayerHighestScores(playerScores0index);
    new
        
score_Text[500] = "\n",
        
player_Name[MAX_PLAYER_NAME]
    ;
    for(new 
i10; ++i)
    {
          if(
index)
          {
                
GetPlayerName(playerScores[i][player_ID], player_Namesizeof(player_Name));
                
format(score_Textsizeof(score_Text), "%s{FFFFFF}%dє - {1E90FF}%s {FFFFFF}- Score: {FFD700}%d\n"score_Text1player_NameplayerScores[i][player_Score]);
          }
          else
          {
                
format(score_Textsizeof(score_Text), "%s{FFFFFF}%dє - {1E90FF}Ninguйm\n"score_Text1);
          }
    }
    
ShowPlayerDialog(playeridDIALOG_MENSAGEMDIALOG_STYLE_MSGBOX"{FFFFFF}TOPScore {228B22}20"score_Text"Fechar""");
    return 
true;




Re: Ranking bugado - best95 - 24.02.2015

mandei um print pra ter noзгo do BUG em questгo .. criei outra conta e as que tinham score nгo apareзem no /ranking e a conta nova nem score tem kkk

print abaixo:


Re: Ranking bugado - #Luca[S]. - 24.02.2015

Jб tentou o edit que postei acima


Re: Ranking bugado - best95 - 24.02.2015

sim,ficou a mesma coisa do print acima amigo.


Re: Ranking bugado - best95 - 24.02.2015

tem essa outra parte do codigo talvez esta nela o problema??

pawn Код:
enum rankingEnum
{
    player_Score,
    player_ID
}


stock GetPlayerHighestScores(array[][rankingEnum], left, right)
{
    new
        tempLeft = left,
        tempRight = right,
        pivot = array[(left + right) / 2][player_Score],
        tempVar
    ;
    while(tempLeft <= tempRight)
    {
        while(array[tempLeft][player_Score] > pivot) tempLeft++;
        while(array[tempRight][player_Score] < pivot) tempRight--;

        if(tempLeft <= tempRight)
        {
            tempVar = array[tempLeft][player_Score], array[tempLeft][player_Score] = array[tempRight][player_Score], array[tempRight][player_Score] = tempVar;
            tempVar = array[tempLeft][player_ID], array[tempLeft][player_ID] = array[tempRight][player_ID], array[tempRight][player_ID] = tempVar;
            tempLeft++, tempRight--;
        }
    }
    if(left < tempRight) GetPlayerHighestScores(array, left, tempRight);
    if(tempLeft < right) GetPlayerHighestScores(array, tempLeft, right);
}



Re: Ranking bugado - JonathanFeitosa - 25.02.2015

Primeiro erro: Tente setar os players para level 1+.
Segundo erro: Olha seu Loop: for(new i; i < 10; ++i)

Aproveitando, Leia tambйm as regras, independente de vocк estб voltando agora, elas valem para todos.

Quote:
Originally Posted by LuxurioN™
Посмотреть сообщение
  • Nгo й permitido "Double Post" (Postagem dupla) antes de 24 horas. Existe um botгo chamado "Editar" .



Re: Ranking bugado - best95 - 26.02.2015

Nгo entendi primeiro errado e segundo erro.. explique melhor fazendo o favor.