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
-- Bomb viewer(in ms) by Rian2_idih
countdown = false
timebomb = tonumber(game("mp_c4timer"))
timenodefuse = (timebomb-10)
timedefuse = (timebomb-5)
timems = 0
addhook("bombplant","startcount")
function startcount(id)
	countdown = true
end
addhook("bombdefuse","defusing")
function defusing(id)
	parse("hudtxt 48 \" \" 0 0")
	parse("hudtxt 47 \" \" 0 0")
	countdown = false
end
addhook("bombexplode","bom")
function bom()
	parse("hudtxt 48 \" \" 0 0")
	parse("hudtxt 47 \" \" 0 0")
	countdown = false
end
addhook("ms100","msview")
function msview(id)
	if countdown==true then
		timems = timems-1
		if timems<0 then
			timems = 9
			timebomb = timebomb-1
			timenodefuse = (timebomb-10)
			timedefuse = (timebomb-5)
			if timebomb<0 and timems==0 then
				timebomb = 0
				timems = 0
				countdown = false
			end
			if timedefuse<0 then timedefuse = 0 end
			if timenodefuse<0 then timenodefuse = 0 end
		end
		parse("hudtxt 47 \""..timebomb..":"..timems.."\" 300 5")
		if player(id,"process")==2 then
			if player(id,"defusekit")==true then
				parse("hudtxt 48 \""..timedefuse..":"..timems.."\" 300 10")
			else
				parse("hudtxt 48 \""..timenodefuse..":"..timems.."\" 300 10")
			end
		end
	end
end
addhook("startround","resetconfig")
function resetconfig()
	countdown = false
	timebomb = tonumber(game("mp_c4timer"))
	timenodefuse = (timebomb-10)
	timedefuse = (timebomb-5)
	timems = 0
end