http://prntscr.com/41lwui
Forum
CS2D Scripts Script Restart Round Every 30 Minutes.Script Restart Round Every 30 Minutes.
18 replies 1
http://prntscr.com/41lwui
1
2
3
4
5
2
3
4
5
addhook("startround","whatever") function whatever() 	freetimer("parse","restart") 	timer(1800000,"parse","restart") end
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
res=0 addhook("minute","_rest") function _rest() res=res+1 	if res==30 then 	parse("restart") 	res=0 	end end
Yes I saw the more I wanted with an indicator of decreasing screen!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
min = 30 sec = 0 posX = 240 -- change to wherever you want in screen posY = 240 -- same thing for Y axis value addhook("second","whatever") function whatever() 	if sec == 0 then 		sec = 59 		if min > 0 then 			min = min - 1 		elseif min == 0 then 			parse("restart") 			min = 30 		end 	end	 	parse('hudtxt 0 "\169255255255Time until restart: "..min..":"..sec..'" "..posX.." "..posY.." 0') end addhook("startround","alsowhatever") function alsowhatever() 	min = 30 	sec = 0 end
Note that I was too lazy to make it perfect. When seconds are below 10, you will see a single number.
In other words
14:11
14:10
14:9
not
14:11
14:10
14:09
Anyone is free to fix it up.
1
mp_timelimit 30
TimeQuesT has written
LUA ERROR: sys/lua/construa.lua:17: ')' expected near '" "'
The more I use deathmatch gamemode then it has to be scripted !
@TimeQuesT
The time is frozen.
Image: http://prntscr.com/41n622
30 frozen, seconds from 61.
Imagem: http://prntscr.com/41nasu
1
if sec == 0 then
1
if sec <= 0 then
Working perfectly. If I want to add or remove minutes as I do?
1
lua min = YourNumberHere;
And for seconds
1
lua sec = YourNumberHere;
Depending if you're using a dedicated you also have to add rcon infront of the command. Like:
1
rcon lua min = YourNumberHere;
I thank everyone for the help
1