Forum

> > CS2D > Scripts > Restart Time Error
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Restart Time Error

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Restart Time Error

Bozo_
User Off Offline

Zitieren
Hi
How can I fix this script:

Spoiler >


Well, the error is it:
When 5 minutes are gone, the "|" symbol must change into above one, leading to 0, and when it was on 0, the round restarts. On my error, it does not happens.

alt Re: Restart Time Error

Nekomata
User Off Offline

Zitieren
Well there's no decrements, so it wouldn't work.
1
minute = minute - 1
Add this as the first line of the function;
1
2
3
function time_hud(id)
	minute = minute - 1
	-- rest of the script

alt Re: Restart Time Error

Cure Pikachu
User Off Offline

Zitieren
That one fix won't be enough, because the function is hooked to cs2d lua hook minute and cs2d lua hook second . That means the function will be called once every second and twice every minute, so the round actually restarts in about 1 minute, not an hour. Not to mention that once it does restart, it will endlessly keep restarting.

This is how I will do it: >
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht