07.05.2013, 15:59
pawn Код:
if(listitem == 2)
{
for(new i; i != MAX_PLAYERS; ++i)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
playerScores[index][Player_Trabalho] = APlayerData[i][StatsTruckerJobs];
playerScores[index++][player_ID] = i;
}
}
GetPlayerHighestScores(playerScores, 0, index);
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_Trabalho]);
}
else
format(score_Text, sizeof(score_Text), "%s{FFFFFF}%dє Ninguem\n", score_Text, i + 1);
}
ShowPlayerDialog(playerid, RANKING2, DIALOG_STYLE_MSGBOX, "Rank - Caminhoneiro", score_Text, "Voltar", "Fechar");
}// Motorista de Onibus