Dateien

> > CS2D > Lua Scripts > Score restore
DateiübersichtCS2D-ÜbersichtLua Scripts-Übersicht

Englisch Score restore >

8 Kommentare973 b, 585 Downloads

alt 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.
Zugelassen von SQ

Download Download

973 b, 585 Downloads

Kommentare

8 Kommentare
Zum Anfang Vorherige 1 Nächste Zum Anfang

Logge dich ein!

Du musst dich einloggen, um selber Kommentare verfassen zu können!Einloggen

alt

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.

alt

dizziness
User Off Offline

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

alt

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
Ich mag es!

alt

Scaleopi
User Off Offline

Pretty simple,but very usefull.
Ich mag es!

alt

3RROR
User Off Offline

Thanks for the comment
I never think a score saving lol!
5/5
Ich mag es!

alt

maPmaKer
User Off Offline

Good work. It's useful for most of the game modes. 5/5:D
Ich mag es!

alt

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.

alt

3RROR
User Off Offline

Then, what happens if he kill more than 999999 kills?
Like turret spamming
Ich mag es!
Zum Anfang Vorherige 1 Nächste Zum Anfang