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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
function initArray(m)
local array = {}
for i = 1, m do
array[i]=0
end
return array
end
aps=initArray(32)
xp=initArray(32)
upxp=initArray(32)
lvl=initArray(32)
zmhealth=initArray(32)
addhook("menu","zimenu")
addhook("startround","zistartround")
addhook("endround","ziendround")
addhook("second","zisecond")
addhook("serveraction","ziserveraction")
addhook("hit","longshot")
addhook("spawn","zispawn")
addhook("join","zijoin")
addhook("kill","zikill")
addhook("always","zialways")
parse("mp_autoteambalance 0")
function zispawn()
	if player(id,"team")==2 then
		parse('hudtxt2 '..id..' 5 "?020200020Level: '..lvl[id]..'" 35 415 0')
		parse('hudtxt2 '..id..' 6 "?020200020Experience: '..xp[id]..'/'..upxp[id]..'" 110 415 0')
		parse('hudtxt2 '..id..' 7 "?020200020Ammo Packs: '..aps[id]..'" 260 415 0')
	elseif player(id,"team")==1 then
		parse('hudtxt2 '..id..' 4 "?020200020HP: '..zmhealth[id]..'" 110 415 0')
		parse('hudtxt2 '..id..' 5 "?020200020Level: '..lvl[id]..'" 110 415 0')
		parse('hudtxt2 '..id..' 6 "?020200020Experience: '..xp[id]..'/'..upxp[id]..'" 260 415 0')
		parse('hudtxt2 '..id..' 7 "?020200020Ammo Packs: '..aps[id]..'" 370 415 0')
	end
end
function zialways()
	if player(0,"team2living") then
		parse('hudtxt2 '..id..' 5 "?020200020Level: '..lvl..'" 35 415 0')
		parse('hudtxt2 '..id..' 6 "?020200020Experience: '..xp..'/'..upxp..'" 110 415 0')
		parse('hudtxt2 '..id..' 7 "?020200020Ammo Packs: '..aps..'" 260 415 0')
	elseif player(0,"team1living") then
		parse('hudtxt2 '..id..' 4 "?020200020Level: '..zmhealth..'" 110 415 0')
		parse('hudtxt2 '..id..' 5 "?020200020Level: '..lvl..'" 110 415 0')
		parse('hudtxt2 '..id..' 6 "?020200020Experience: '..xp..'/'..upxp..'" 260 415 0')
		parse('hudtxt2 '..id..' 7 "?020200020Ammo Packs: '..aps..'" 370 415 0')
	end
end
function zikill(k,v,w) --killer victim weapon
	aps[k]=aps[k]+1
	xp[k]=xp[k]+5
	if xp[k]>=upxp[k] then
		lvl[k]=lvl[k]+1
		upxp[k]=upxp[k]*2
		xp[k]=0
		msg(string.char(169).."?255000255"..player(k,"name").." has reached to Level "..lvl[k].."!")
		msg2(k,string.char(169).."255000255You have reached to Level "..lvl[k].."!@C")
	end
end
function zijoin(id)
	aps[id]=0
	xp[id]=0
	upxp[id]=200
	lvl[id]=1
	zmhealth=0
end
function zistartround()
	countzidown=math.random(10,20)
end
function zisecond()
	if countzidown~=nil then
		if countzidown==-1 then
			t=player(0,"team2")[math.random(0,#player(0,"team2"))]
			msg(string.char(169).."000128000"..player(t,"name").." is Nemesis@C")
			parse("maket "..t)
			countzidown=nil
		else
			msg(string.char(169).."000128000"..countzidown.." Seconds Left@C")
			countzidown=countzidown-1
		end
	end
end
function ziendround()
	for _,id in ipairs(player(0,"team1")) do
		parse("makect "..id)
	end
end
zistartround()
function ziserveraction(id,action)
	if action==1 then
		menu(id,"Buy Menu,Human,Zombies")
	end
end
function zimenu(id,title,button)
	if title=="Buy Menu" then
		if player(id,"team")==2 then
			if button==1 then
				menu(id,"Human,Heal Potion|50 APs,Super HP|100 APs,Kevlar|75 APs,Super Kevlar|150 APs")
				if player(id,"team")==1 then
					if button==2 then
						menu(id,"Zombies,Infection bomb|50 APs")
					end
				end
			end
		end
	elseif title=="Human" then
		if button==1 and aps[id]>=50 then
			aps[id]=aps[id]-50
			parse("sethealth "..id.." 250")
			msg(string.char(169).."000255000You have buy Heal Potion!@C")
		else
			msg(string.char(169).."25500000You have not enough Aps!@C")
		end
	end
end