[Pedido] Comandos
#9

UP, achei um a FS de ranking por mortes alguйm poderia converter ou me dar um exemplo de como eu poderia converte-lo de de Mortes para o maior Score.

http://i.imgur.com/BOVDjw2.jpg

pawn Код:
enum Ranking
{
        Score, Id
}
 
enum pDados
{
        pMatou
}
 
new PlayerScore[MAX_PLAYERS][Ranking];
new PlayerDados[MAX_PLAYERS][pDados];
 
CMD:ranking(playerid)
{
    new n = 0, Rmsg[1000];
    for (new i = 0; i < MAX_PLAYERS; i++)
        {
        if (IsPlayerConnected(i) && !IsPlayerNPC(i))
        {
            PlayerScore[n][Score] = PlayerDados[i][pMatou];
            PlayerScore[n][Id] = i;
            n++;
        }
    }
    GetPlayerHighestScores(PlayerScore, 0, n);
    for (new i = 10; i > 0; i--)
    if (PlayerScore[i][Id] == PlayerScore[i - 1][Id]) PlayerScore[i][Id] = 999;
    for (new i = 0; i < 10; i++)
        {
        if (PlayerScore[i][Id] == 999) format(Rmsg, sizeof(Rmsg), "{FFFF00}%s %i - Ninguйm.\n", Rmsg, i + 1);
        else
                {
            new BaianoGTS[MAX_PLAYER_NAME];
            GetPlayerName(PlayerScore[i][Id], BaianoGTS, sizeof(BaianoGTS));
            format(Rmsg, sizeof(Rmsg), "{FFFF00}%s %i - %s | [Matou %i]\n", Rmsg, i + 1, BaianoGTS, PlayerScore[i][Score]);
        }
    }
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "{FF0000}Ranking", Rmsg, "Ok", "");
    return 1;
}

stock GetPlayerHighestScores(array[][Ranking], left, right)[...]

+Rep para quem me ajudar.
Reply


Messages In This Thread
Comandos - by Ts3 - 24.10.2014, 16:14
Re: Comandos - by ArthurxD - 24.10.2014, 16:32
Re: Comandos - by Ts3 - 24.10.2014, 16:41
Re: Comandos - by ArthurxD - 24.10.2014, 17:00
Re: Comandos - by ReyMysterio - 24.10.2014, 17:03
Re: Comandos - by Ts3 - 24.10.2014, 17:28
Re: Comandos - by Schocc - 24.10.2014, 17:53
Re: Comandos - by Ts3 - 24.10.2014, 18:37
Re: Comandos - by Ts3 - 25.10.2014, 18:08
Re: Comandos - by JuninTJF - 25.10.2014, 19:17

Forum Jump:


Users browsing this thread: 2 Guest(s)