Scorekeeper

[Open Assets] Scorekeeper v1

Scorekeeper is a script that keeps track of a player's score between re-joins and server restarts by saving it to a file.
If a player does not re-join with in 1 week (by default) their score is removed from the list.
A player's score is tied to their name. If a player where to change their name, their score will be reset to that new name's score.


scores.png


As well as being a small script for saving peoples scores, it is also a small demonstration of the IO functionality added to SRB2Kart in 1.3, as it saves to and loads from a file to keep track of scores, and syncs the score table using a netvar. As the table is constructed from the file as soon as the script is loaded, it is able to get around the inability to send files to other players.

When being ran on a server, SRB2Kart has to be able to write into the luafiles folder. I have had some people have trouble with this, and the script has been un-able to write the save file.

The file that this script writes to is called scorekeeper.txt. It is only written to on the server.


sk_hoursuntilreset (Default: 168)
How long until a player's score is removed from the list in hours. The default of 168 is equal to 1 week.
funnycmd.png

Thanks to War-Dog for allowing me to test this script on their server.
  • Cool!
Reactions: Jrc126 and Lonsfor
Author
Callmore
Downloads
596
Views
1,754
Extension type
lua
File size
3.4 KB
MD5 Hash
9163e8d2c0235135583a1d926bd40fc8
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Callmore

Share this resource

Back
Top