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
nemesis_cnt = {}
hatid = {}
addhook("join","cntzero")
function cntzero(id)
nemesis_cnt[id] = 0
hatid[id]=nil
end
addhook("startround","fakfrancis")
function fakfrancis()
for id = 1,32 do
if player(id,"exists") then
freeimage(hatid[id])
nemesis_cnt[id] = 0
end
end
end
addhook("spawn","cntzeros")
function cntzeros(id)
if nemesis_cnt[id] == 1 then
if hatid[id] ~= nil then freeimage(hatid[id]) end
hatid[id]=image("gfx/zombieplague/zombieboss.png",1,1,200+id)
end
end
function zp_nemesis_form()
	local ct_nem = zp_ct_table()
	if (zp_ct_cnt() > 0) then
		zp_snd(math.random(9,10))
		zp_nemesis_id = ct_nem[math.random(1,zp_ct_cnt())]
		local n = zp_nemesis_id
		zp_p_class[n] = -1
		zp_msg(8,player(n,'name')..' is Zombie Boss!@C')
		nemesis_cnt[n] = 1
		hatid[n]=image("gfx/zombieplague/zombieboss.png",1,1,200+n)
		local x = player(n,'x')
		local y = player(n,'y')
		parse('maket '..n)
		parse('spawnplayer '..n..' '..x..' '..y)
		zp_player_hud(n)
		if (zp_hud_flashlight > 0) then	imagealpha(p_light[n],0) end
	end
end