[Pedido] Rank
#1

Existe como fazer rank de ping й fps dos players? tipo

Rank do melhor ping: TalNome \n2 Lugar: TalNome
Rank do melhor fps: TalNome \n2 Lugar: TalNome
Reply
#2

pawn Код:
[quote=zSuYaNw;2162516]Cara tire este seu AVATAR...

[php]

forward RankingMaisPontos(); public RankingMaisPontos(){

    // Criamos as variбveis
    new Scores[MAX_PLAYERS], log[100], nome[24];
   
   
    // Pegamos as pontuaзхes
    for(new i, e = GetMaxPlayers(); i != e; ++i){
        format(log, 100, "Contas/%s.pwn", (GetPlayerName(i, nome, 24), nome));
        Scores[i] = dini_Int(log, "Pontos");
    }
   
   
    // Classificamos
    BubbleSort(Scores, sizeof(Scores));
   
   
    // Limpamos a array "log".
    log[0] = EOS;
   
   
    // Imprimimos.
    format(log, ""Grad3"[Ranking Ping] "Creme"%s "Grad3"estб em Primeiro Lugar no Ranking de Ping com "Creme"%d", Nome(0), Scores[0]);
    SendClientMessageToAll(-1, log);
    return true;
}

static stock BubbleSort(v[], size)// Function By SuYaNw (http://pastebin.com/PQTTwzgB)
{
    #if !defined s_swap
        #define s_swap(%0,%1)  (%0 ^= %1, %1 ^= %0, %0 ^= %1) //By: SuYaNw's
    #endif
    for(new i = 1; i != size; ++i)
    {
        for(new q = 0; (q != size - i); ++q)if(v[i] > v[q]) s_swap(v[q],v[i]);
    }
}[/php][/quote]


Apenas troque por

pawn Код:
// Pegamos as pontuaзхes
    for(new i, e = GetMaxPlayers(); i != e; ++i){
        Scores[i] = GetPlayerScore(i);
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)