Need /toprecs for ALL records

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

Post Reply
Olymptor
sunday driver
sunday driver
Posts: 59
Joined: 16 May 2009 00:15
Owned TM-games: TMUF, TMO, TMS

Need /toprecs for ALL records

Post by Olymptor » 13 Apr 2014 02:11

Hi, i need to use function chat_toprecs but returning not only record from current tracklist but simply all records present in database.

But this original Xymph function is to hard for me ^^
It check tracklist (this is i want to delete) and after use sql request (i know use this request) but in realtion with tracklist and finally return informations to display_manalinks...
I'm lost here.
If someone can help me rewrite the function whithout checking tracklist and return good original informations but with all records.

Thanks.

Olymptor
sunday driver
sunday driver
Posts: 59
Joined: 16 May 2009 00:15
Owned TM-games: TMUF, TMO, TMS

Re: Need /toprecs for ALL records

Post by Olymptor » 16 Apr 2014 06:03

I found a solution :3

Remove this line :
if (array_key_exists($row->Uid, $newlist))
But code is catastrophic because is checking so many unnecessary things :roflol: and that cause fews lags
But it works :mrgreen:

EDIT : It still have a problem :/
Cause of "arsort" function, people who are equal are not in good order
==> I decided to put last on an equal records count, the player who has done his track last (and of course the first player which have for example 5 records will be always first of all players who will have 5 records)
This works fine because i changed sql query and fufi_widget display in good order, but when i use /toprecs for display complete ranking.. that doesn't work anymore :/ (cause of arsort function)
Please help ^^

Post Reply