But I have one problem how to make that time stopped on 0 and did not leave in a minus (-1,-2,-3....)
Forum
CS2D Scripts Time scriptTime script
10 replies 1
But I have one problem how to make that time stopped on 0 and did not leave in a minus (-1,-2,-3....)
(btw.: you shouldn't use the sample table for your scripts. it's for samples )
But I have 1 more question. How to make that in the beginning of each round the timer was = 60? Because at start of a card the script starts to work for me normally, time reaches to 0 and at a new round the timer is not nulled till 60 seconds. How it to correct?
edited 1×, last 15.10.11 12:46:31 am
1
2
3
4
2
3
4
addhook("startround","start") function start() 	sample.hudtxt.timer=60 end
1
2
2
function sample.hudtxt.second() end
replace the 2 lines above with
1
freehook("second","sample.hudtxt.second")
and also add
1
addhook("second","sample.hudtxt.second")
that should fix your problem.
of course you could also have done it the way I suggested (with the >0 condition). would have been much easier
That I do not understand that
1