[Ajuda] Ranking
#10

PHP Code:
new
bool:TopFoi[512],
string_format[128],
Valor_Maximo[10] = -1,
PlayerMelhor[10][24],
Percorrido
;
CMD:rank(playerid)
{
    
TopPlayersOnline(playerid);
    return 
1;
}
stock TopPlayersOnline(playerid)
{
    while(
Percorrido 10) {
        for(new 
i500i++)  if(IsPlayerConnected(i)) {
            if(
GetPlayerScore(i) > Valor_Maximo[Percorrido] && TopFoi[i] == false) {
                
GetPlayerName(i,PlayerMelhor[Percorrido],24);
                
Valor_Maximo[Percorrido] = GetPlayerScore(i);
                
TopFoi[i] = true;
            }
        }
        
Percorrido++;
    }
    for(new 
a500a++)  if(IsPlayerConnected(a)) TopFoi[a] = false;
    
Percorrido 0;
    for(new 
i10;i++) {
        if(
PlayerMelhor[i][0] != EOS) {
            
format(string_format,64,"[%d] - Player: %s | Score: %d",i+1,PlayerMelhor[i],Valor_Maximo[i]);
            
SendClientMessage(playerid,0xC9170EFF,string_format);
            
Valor_Maximo[i] = -1;
        }
    }

Reply


Messages In This Thread
Ranking - by Don_Speed - 21.04.2013, 17:46
Re: Ranking - by Kmatsu - 21.04.2013, 18:00
Re: Ranking - by Sky™ - 21.04.2013, 18:03
Re: Ranking - by MatheusAlcapone - 21.04.2013, 18:07
Re: Ranking - by Don_Speed - 21.04.2013, 18:22
Re: Ranking - by Supera - 21.04.2013, 18:36
Re: Ranking - by Skream - 21.04.2013, 19:36
Re: Ranking - by leonardo1434 - 21.04.2013, 20:24
Re: Ranking - by Don_Speed - 21.04.2013, 22:12
Re: Ranking - by Gleisson_. - 21.04.2013, 23:42

Forum Jump:


Users browsing this thread: 2 Guest(s)