Posts: 126
	Threads: 44
	Joined: Apr 2015
	
Reputation: 
0
	 
 
	
	
		Hello i'm working on a sophisticated damage system and i want to pick 3 best players who did best damage, example:
(1) %s did 400 damage.
(2) %s did 300 damage.
(3) %s did 200 damage.
I need to know how can you take those 3 players and put them on a list like i stated before??
Highly appreciated any threads/tutorials or a tip guys.
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 126
	Threads: 44
	Joined: Apr 2015
	
Reputation: 
0
	 
 
	
	
		Not that i already have a damage system, but i want to pick up 3 best players each 15 minutes in chat like i told above.
Example: 3 best player money, i need to make a check/loop through everyone in the server and only picking up 3 players which has high numbers
	
	
	
	
		
	
 
 
	
	
	
		
	Posts: 716
	Threads: 92
	Joined: May 2018
	
	
 
	
	
		Something like this?
pawn Код:
CMD:richlist(playerid)
{
    new data[MAX_PLAYERS][2];
    foreach (new i : Player)
    {
        data[i][0] = GetPlayerMoney(i);
        data[i][1] = i;
    }
    QuickSort_Pair(data, true, 0, Iter_Count(Player));
    SendClientMessage(playerid, -1, "* Top 5 rich players currently online:");
    new buf[150];
    for (new i; i < 5; i++)
    {
        if (data[i][0])
        {
            format(buf, sizeof(buf), "%i. %s (%i) - %i$", i + 1, ReturnPlayerName(data[i][1]), data[i][1], data[i][0]);
            SendClientMessage(playerid, COLOR_DODGER_BLUE, buf);
        }
    }
    return 1;
}