Forum

> > CS2D > Scripts > Restart Time Error
Forums overviewCS2D overview Scripts overviewLog in to reply

English Restart Time Error

3 replies
To the start Previous 1 Next To the start

old Restart Time Error

Bozo_
User Off Offline

Quote
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.

old Re: Restart Time Error

Nekomata
User Off Offline

Quote
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

old Re: Restart Time Error

Cure Pikachu
User Off Offline

Quote
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: >
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview