[Ajuda] Ranking bugado
#1

@REMOVIDO
Reply
#2

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

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.
Reply
#4

@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;

Reply
#5

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:
Reply
#6

Jб tentou o edit que postei acima
Reply
#7

sim,ficou a mesma coisa do print acima amigo.
Reply
#8

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);
}
Reply
#9

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" .
Reply
#10

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


Forum Jump:


Users browsing this thread: 2 Guest(s)