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
addhook("hit","_hit")
addhook("join","_join")
addhook("startround","_startround")
addhook("parse","_parse")
given={}
givenTotal={}
function _hit(id,source,weapon,hpdmg)
	givenTotal[id]=givenTotal[id]+hpdmg
	given[id]=given[id]+hpdmg
end
function _join(id)
	givenTotal[id]=0
	given[id]=0
end
function _startround()
	local highestDamage={}
	for _,id in ipairs(player(0,"tableliving")) do
		if math.max(unpack(given))==given[id] then
			table.insert(highestDamage,id)
		end
	end
	if #highestDamage>1 then
		msg(string.char(169).."000200255"..#highestDamage.." people with the highest damage of "..math.max(unpack(given))..".")
		msg(string.char(169).."000200255------------------------------")
		for _,id in ipairs(highestDamage) do
			msg(string.char(169).."000200255"..player(id,"name"))
		end
	elseif #highestDamage==1 then
		msg(string.char(169).."000200255 Man of The Round: "..player(highestDamage[1],"name").." - DMG: "..math.max(unpack(given)))
	else
		msg(string.char(169).."255000000No one had the highest amount of damage.")
	end
	for _,id in ipairs(player(0,"table")) do
		given[id]=0
	end
end
function _parse(text)
	if string.lower(text)=="zero" then
		parse("sv_restart 5")
		timer(5000,"reset")
		print("------------------------------")
		msg("©000200120[ RESETING ]@C")
		return 1
	end
end
function reset()
	msg("©000200255 ----------[LIVE]----------@C")
	msg("©255069000 ----------[LIVE]---------- @C")
	msg("©255200120----------[LIVE]---------- @C")
	msg(" @C")
	msg("©200100120---[Good LucK & Have FuN! ]---@C")
	for _,id in ipairs(player(0,"table")) do
		_join(id)
	end
end