I looked at your code and finally understood where to start. You actually saved me a lot of time doing reverse engineering with psychostats. The problem is that they closed access to their forum do to hacking attempt.
What I did, I edited the PS core file, duplicated the get_players function and used a LEFT JOIN with gg_stats. And now I have stats which can be sorted just like Players statistics in psychosts
__________________