Files

> > CS2D > Lua Scripts > Score restore
Files overviewCS2D overviewLua Scripts overview

English Score restore >

8 comments973 b, 597 Downloads

old Score restore

Kiffer-Opa
User Off Offline

Score restore v1.0

This script saves the score and deaths of a player (in variables) as seen in the scoreboard and if a player re-joins in the same round his score and deaths are set to the values before he left and shows him a notification.
The player must use USGN to let this work (other authentification methods are just too unsecure).

Because the script works most the time in the background, it's up to you to let the players know that USGN users don't have to fear a loss of score after re-join, for example by using text in serverinfo.txt.


Installation: Extract the zip package to CS2D directory.
To load script:
Either type
1
lua dofile("sys/lua/scorerestore.lua")
in console on a running server or add
1
dofile("sys/lua/scorerestore.lua")
into sys/lua/server.lua to start the script on server start.
Approved by SQ

Download Download

973 b, 597 Downloads

Comments

8 comments
To the start Previous 1 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

Kiffer-Opa
User Off Offline

@LittleChild: The script does not read the stats file. It just saves the values in variables and not in a file. It seemed to be the simplest solution to me.

old

dizziness
User Off Offline

Nice job, kiffer opa did this lua scirpt read the stats files or saving?

old

Apache uwu
User Off Offline

Yeah I doubt anyone will get past 5 digits--and I believe cs2d does support floats so even if they play non-stop for a few weeks...not possible
I like it!

old

Scaleopi
User Off Offline

Pretty simple,but very usefull.
I like it!

old

3RROR
User Off Offline

Thanks for the comment
I never think a score saving lol!
5/5
I like it!

old

maPmaKer
User Off Offline

Good work. It's useful for most of the game modes. 5/5:D
I like it!

old

Kiffer-Opa
User Off Offline

Nothing happens. I think it should also work with 1000000 kills; the space on the scoreboard provides enough space for 7 digits and the script shouldn't crash. CS2D will behave strange if you have real big numbers with more digits, for this the script can't help.
The highest scores ppl reached on normal way I've seen were only 3-digit. Any score higher than 10000 is in my opinion definately reached with cracking, not with kills. You need quite a time to reach 10000 even with turret spamming. This script can't help you out there. You still have to ban cheaters and other idiots on your own and banned players of course can't join and therefore never get their score restored.

old

3RROR
User Off Offline

Then, what happens if he kill more than 999999 kills?
Like turret spamming
I like it!
To the start Previous 1 Next To the start