[Ajuda] Bug no /recorde aq pf ajudem
#1

Esse й o comando que mostra o player de mais score e mais dinheiro online.... bom aparece o score mais alto online e a grana mais alta... sу q o nome do player q tem essa quantia de dinheiro ou score n aparece certo aparece de outro '-'
pawn Код:
CMD:recorde(playerid)
{
    new Var1[100], Var2[100];
    new NomeRecorde[MAX_PLAYER_NAME];
    new NomeRecorde2[MAX_PLAYER_NAME];
    new Jogador, Dinheiro,score3, score2, Ultimo, score, Maior;
    for(new x = 0, y = GetMaxPlayers(); x != y; x++) {
        GetPlayerName(x, NomeRecorde, sizeof(NomeRecorde));
        GetPlayerName(x, NomeRecorde2, sizeof(NomeRecorde2));
        Dinheiro = GetPlayerMoney(x);
        score = GetPlayerScore(x);
        if(Dinheiro > Ultimo) {
            Maior = Dinheiro;
            Jogador = x;
        }
        if(score > score2) {
            score3 = score;
            Jogador = x;
        }
        Ultimo = Dinheiro;
        score2 = score;
    }
    SendClientMessage(playerid, Amarelo, "|______________ O Recorde dos que estгo on й: ____________|");
    format(Var1, sizeof(Var1), "[INFO] O mais rico й %s[ID:%d] - Dinheiro: %d.", NomeRecorde, Jogador, Maior);
    SendClientMessage(playerid, Verde, Var1);
    format(Var2, sizeof(Var2), "[INFO] O de mais score й %s[ID:%d] - Score: %d.", NomeRecorde2, Jogador, score3);
    SendClientMessage(playerid, Verde, Var2);
    return true;
}
Reply
#2

pawn Код:
CMD:recorde(playerid)
{
    new Var1[100], Var2[100];
    new NomeRecorde[MAX_PLAYER_NAME];
    new NomeRecorde2[MAX_PLAYER_NAME];
    new JogadorScore, JogadorDinheiro, score2, Ultimo, score, Maior;
    for(new x = 0, y = GetMaxPlayers(); x != y; x++) {
        Dinheiro = GetPlayerMoney(x);
        score = GetPlayerScore(x);
        if(Dinheiro > Maior) {
            Maior = Dinheiro;
            JogadorDinheiro = x;
            GetPlayerName(x, NomeRecorde, sizeof(NomeRecorde));
        }
        if(score > score2) {
            score2 = score;
            JogadorScore = x;
            GetPlayerName(x, NomeRecorde2, sizeof(NomeRecorde2));
        }
        //Ultimo = Dinheiro;
        //score2 = score;
    }
    SendClientMessage(playerid, Amarelo, "|______________ O Recorde dos que estгo on й: ____________|");
    format(Var1, sizeof(Var1), "[INFO] O mais rico й %s[ID:%d] - Dinheiro: %d.", NomeRecorde, JogadorDinheiro, Maior);
    SendClientMessage(playerid, Verde, Var1);
    format(Var2, sizeof(Var2), "[INFO] O de mais score й %s[ID:%d] - Score: %d.", NomeRecorde2, JogadorScore, score2);
    SendClientMessage(playerid, Verde, Var2);
    return true;
}
Reply
#3

vlw mano brigado mesmo
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)