22.05.2014, 18:49
I don't know what kind of criterias will you use to class the players, but let's imagine that you own a CnR server, and you want to class the players from the one who got the biggest wanted level to the 10th who got the biggest.
You must first get the wanted level of all player's file, using a for loop. Then, take the var which stores the wanted level of the player (still in the loop), and store it to the first slot of a 10-cells array.
Then, take the second player file, and compare it to the first cell of the array. If it's bigger, then change the values : put the first cell of the array (0) to the second (1) and put the higher var in the first cell (0).
If you haven't understood, I can explain more.
You must first get the wanted level of all player's file, using a for loop. Then, take the var which stores the wanted level of the player (still in the loop), and store it to the first slot of a 10-cells array.
Then, take the second player file, and compare it to the first cell of the array. If it's bigger, then change the values : put the first cell of the array (0) to the second (1) and put the higher var in the first cell (0).
If you haven't understood, I can explain more.

