1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
_timer = 4
addhook("second", "countdown")
function countdown ()
	if _timer > 0 then
		msg(_timer.." seconds remaining...")
		parse("sv_sound countdwn_".._timer..".wav")
		_timer = _timer - 1
	elseif _timer == 0 then
		msg("FIGHT!@C")
		parse("sv_sound start.wav")
		for _, i in pairs(player(0,"table")) do
			if player(i,"health") > 0 then
				parse("speedmod " .. i .. " 0")
			end
		end
		_timer = -1
	end
end
addhook("startround","start")
function start()
	for _, id in pairs(player(0,"table")) do
		parse("speedmod "..id.." -100")
	end
	_timer = 4
end
I changed "timer" to "_timer" because timer is a function of CS2D. like a hook.
edited 3×, last 30.06.10 01:18:22 am
Lua Scripts/Questions/Help


Offline