SA-MP Forums Archive
Getting the IDs of the player with highest score - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Getting the IDs of the player with highest score (/showthread.php?tid=244447)



Getting the IDs of the player with highest score - Skiaffo - 27.03.2011

Hi.

I need to script a function that gets all player's score, and chooses the highest one and get his ID. But, if there are more then one player with the highest score, for example:

PlayerA with score 10
PlayerB with score 8
PlayerC with score 4
PlayerD with score 10
PlayerE with score 10

the function must return the IDs of PlayerA, D and E.

I know how to get one player with the highest score, but have no idea how to get more then one if they have the same highest score.

Thank you


Re: Getting the IDs of the player with highest score - Markx - 27.03.2011

There is a include for that, try to use ****** next time.


Re: Getting the IDs of the player with highest score - Skiaffo - 27.03.2011

Quote:
Originally Posted by Markx
Посмотреть сообщение
There is a include for that, try to use ****** next time.
I already searched on ****** and on the forums, but found nothing.

Could you please link me that? thank you.