TTT Leaderboard

Just finished up a TTT Leaderboard which will track stats and and assign players an all-time score.

Usage: Type ‘TTTLB’ in console. At least one round must have ended while you were connected to the server in order to recieve data, to prevent ghosting. This is something I need to find a workaround for.
Might look into storing the datatable on the server and having the clients request it, rather than sending it to all clients on round end.

—Edit—
Just updated, now caches data and sends to clients on request, provided the server has completed at least one round

as for screenshots, here is one :3
http://cloud-4.steampowered.com/ugc/616176504055549511/0B2B821859A65287547A09E971D949BE668645C6/

Any screenshots of this in action?

I’ll load it on my server and give it a try, then post screenshots.

[editline]9th May 2014[/editline]

Leaderboard prior to first round, no data being shown
Leaderboard being shown after first round

The leaderboard, after the first round, doesn’t update until the end of the round. Innocent and Detective kills aren’t counted unless you’re a Traitor, hence why the ‘Bad Kills’ column is there; if a player kills a teammate, it’ll be added to that column instead. The leaderboard’s stats persist after restart, but it only shows the stats for the players online, instead of all-time stats, which it should do instead.

I have a few suggestions for the plugin. Hook into Wyozi TTT Events, in order to prevent the scoreboard from updating when certain events go on, since those events can manipulate the player’s status (innocent, traitor, detective); Shuffle and Deathmatch are prime examples of this.

Make it so that you can type a chat command or press a configurable F# button in order to open the scoreboard. This is much easier for noobs to do and much more accessible.

[editline]9th May 2014[/editline]

EDIT: Update released as I was typing this. I’ll try that one out too.

Thanks for the suggestions, will implement them both :3

–edit–

perhaps not, don’t really want to rely on a paid addon

Why not check that the addon exists and if so, hook into it?

The Derma category bar can be manipulated in a weird way by dragging the small piece at the right end. Bug?

seems to be a slight issue with the way derma allows resizing columns. Isn’t too big of an issue since closing and re-opening the leaderboard redraws it anyways, but I’ll look into whether disabling it is possible

Update: Fixed caching, bound leaderboard to F9, seem to be having issues getting the gui to draw when the command is called from chat, although the chat command is definitely running the code since the client grabs data from the server

MySQL Support would have been awesome, but good work nevertheless

Added tracking for playtime

Now optionally supports Spectator Deathmatch, just change deathmatchcompat to false in sv_leaderboard.lua if deathmatch is not installed