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 код:
@_CallBack: MostrarRankPlayer(playerid)
{
new
playerScores[MAX_PLAYERS][rankingEnum],
index
;
for(new i; i != MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
playerScores[index][player_Score] = GetPlayerScore(i);
playerScores[index++][player_ID] = i;
}
}
GetPlayerHighestScores(playerScores, 0, index);
new
score_Text[500] = "\n",
player_Name[MAX_PLAYER_NAME]
;
for(new i; i < 10; ++i)
{
if(i < index)
{
GetPlayerName(playerScores[i][player_ID], player_Name, sizeof(player_Name));
format(score_Text, sizeof(score_Text), "%s{FFFFFF}%dє - {1E90FF}%s {FFFFFF}- Score: {FFD700}%d\n", score_Text, i + 1, player_Name, playerScores[i][player_Score]);
}
else
{
format(score_Text, sizeof(score_Text), "%s{FFFFFF}%dє - {1E90FF}Ninguйm\n", score_Text, i + 1);
}
}
ShowPlayerDialog(playerid, DIALOG_MENSAGEM, DIALOG_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.