Jump to content

Auto Update Leaderboard

Pending 2.2.0

Do you thing to can add a feature to auto update the leaderbord?

So I don't need to do it manual, maybe auto update leaderboard every time the plugin saves data to MySql or datafile.
And as an option in the config file     "AutoUpdateLeaderboard": true,

Share this comment


Link to comment

Hi,
I'm not sure that would be a good idea - The main data file and sql do update regularly, but it is an update - There's only ever one set of data.

Leader boards are different because they don't update - You create a brand new one. Each one is unique and timestamped.
It's like a snap-shot of the #1 players at that time, so saving one every time the server saves, for example, would build up lots of data very quickly.

Saving a leaderboard can be done with console command, though, so you have the option of using some other plugin to call that - I'm pretty sure there are timed command plugins out there.
It would be easy enough to have another plugin save a leaderboard, when some event ends for example.

If I can help at all give me a shout, but I'm not sure regular saving leaderboards is needed/a good idea.

 

Share this comment


Link to comment

Sound fair, I found the commands 
WipeLeaderBoards and SaveLeaderboard in the .cs files.
The SaveLeaderboard works, but it doesn't look like the WipeLeaderBoards command is working atm

Share this comment


Link to comment

Hi @BjarkeH
I just took a look. It looks like it should be working fine.
The admin permission is required for wiping leaderboards, though.
I've now changed that so admin perm is required *if* a player is using the command, which means it can then be used from console/rcon too.

Also, that command would wipe local data, but not SQL.
To wipe SQL leaderboards you'd need to just drop them in your SQL panel.

Does that answer the request, or is there more to it?

Also, I'm attaching a copy that addresses those headshot requests.

  • Added PVP Headshots only option - Defaulted to true. (npcs dont count)
  • Added PVP Headshots only count if kill - Defaulted to false.

I meant to send it to you earlier!

PlayerRanks.cs

Share this comment


Link to comment
1.1m

Downloads

Total number of downloads.

5.7k

Customers

Total customers served.

82.3k

Files Sold

Total number of files sold.

1.6m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.