09.04.2013, 20:52
pawn Код:
if(response)
{
new
playerScores[MAX_PLAYERS][rankingEnum],
index
;
if(listitem == 0){
for(new i; i != MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
playerScores[index][player_Score] = GetPlayerScore(i);
playerScores[index][player_Money] = GetPlayerMoney(i);
playerScores[index++][player_ID] = i;
}
}
GetPlayerHighestScores(playerScores, 0, index);
new
score_Text[280],
player_Name[24]
;
for(new i; i < 5; ++i)
{
if(i < index)
{
GetPlayerName(playerScores[i][player_ID], player_Name, sizeof(player_Name));
format(score_Text, sizeof(score_Text), "%s{FFFFFF}%dє - {00FF00}%s(%d){FFFFFF} - %d\n", score_Text, i + 1, player_Name, playerScores[i][player_ID], playerScores[i][player_Score]);
}
else
format(score_Text, sizeof(score_Text), "%s{FFFFFF}%dє N/A\n", score_Text, i + 1);
}
ShowPlayerDialog(playerid, RANKING3, DIALOG_STYLE_MSGBOX, "Rank de Pontos", score_Text, "Voltar", "Fechar");
Truck.BR - 0 = Eu
Tester - 1899 = outro player
Como fazer para isso ficar em ordem?
Tester - 1899
Truck.BR - 1575
Tester2 - 0