I feel like I'm doing this entirely wrong way but I can't imagine for myself any other way to do it.
Here's the code :
Spoiler
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
addhook("flagtake", "no_bot_flag") function no_bot_flag(id,team,x,y) 	if player(id,"bot") == true then 		return 1 	end 	 	--PREVENTS FLAG CAMPING 	for id=1,32 do 		--if player(id,"flag")==true then 			if player(id,"team") == 1 then --terror 			blueFlagAdd = 1 			blueFlagCarrier = "id" 			msg("blue") 			elseif player(id,"team") == 2 then --CT 			redFlagAdd = 1 			redFlagCarrier = "..id.." 			msg("red") 			end 		--end 	end end redFlagCount = 0 redFlagAdd = 0 redFlagMax = 3 redFlagCarrier = 0 blueFlagCount = 0 blueFlagAdd = 0 blueFlagMax = 3 blueFlagCarrier = 0 --FLAG COUNTING addhook("second","flag_tick") timer(1000,"flag_pos") function flag_tick(id) redFlagCount = redFlagCount + redFlagAdd blueFlagCount = blueFlagCount + blueFlagAdd 	--for id=1,32 do 	 	 	if redFlagCount == redFlagMax then 		if player(id,"flag")==true then 		 			if player(id,"team")==2 then 				parse("setpos "..id.." 0 0") 					function flag_pos() 						if player(id,"flag")==true then 							if player(id,"team")==2 then 								parse("killplayer "..id.."") 								msg(""..id.." didn't capture the flag in 60 seconds!") 								redFlagCount = 0 								redFlagAdd = 0 							end 						end 					end 			end 		end 	end 			 	 	if blueFlagCount == blueFlagMax then 		if player(id,"flag")==true then 		 			if player(id,"team")==1 then 				parse("setpos "..id.." 0 0") 					function flag_pos() 						if player(id,"flag")==true then 							if player(id,"team")==1 then 								parse("killplayer "..id.."") 								msg(""..id.." didn't capture the flag in 60 seconds!") 								blueFlagCount = 0 								blueFlagAdd = 0 							end 						end 					end 			end 		end 	end 	--end end