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
-------------------------------
--Zombie plague By (D) Senpai--
-------------------------------
if zp==nil then zp={} end
zp.spawn={}
zp.kill={}
-------------------------------
-- INITIAL SETUP --
-------------------------------
function initArray(m)
	local array = {}
	for i = 1, m do
		array[i]=0
	end
	return array
end
-------------------------------
-------------------------------
-- Bonus
zp.spawn.bonus=initArray(32)
zp.spawn.getbonus2=initArray(32)
zp.spawn.bonus2=initArray(32)
zp.kill.getbonus=initArray(32)
zp.spawn.weapons={1,2,3,4,5,6}
zp.spawn.weapons2={51,52,73,77,87}
zp.spawn.weaponsname={'usp', 'glock', 'deagle', 'p228', 'elite', 'five-seven'}
zp.spawn.weapons2name={'grenade', 'flashbang', 'molotov', 'mine', 'lasermine'}
-------------------------------
-- Script --
-------------------------------
addhook("startround","zp.start")
function zp.start()
	-- Reset Values
		local i
		for i=1,32 do
		zp.spawn.bonus[i]=0
		if (player(i,"exists")) then
		end
	end
end
addhook("join","join_greeting")
function join_greeting(id)
	msg2(id,"Welcome to my server, "..player(id,"name").."!")
end
addhook("spawn","survivor_spawn")
function survivor_spawn(id,team)
	if (player(id,"team")==2) then
		zp.spawn.bonus[id]= math.random(1,3)
		zp.spawn.getbonus2[id]= math.random(1,2)
		zp.spawn.bonus2[id]= math.random(1,5)
		parse("strip "..id.." 0")
		parse("equip "..id.." "..zp.spawn.weapons[zp.spawn.bonus[id]])
		msg2(id,"[Zombie Plague info]You got "..zp.spawn.weaponsname[zp.spawn.bonus[id]].." pistol!")
		if (zp.spawn.getbonus2[id]==2) then
			parse("equip "..id.." "..zp.spawn.weapons2[zp.spawn.bonus2[id]])
			msg2(id,"[Zombie Plague info]You got "..zp.spawn.weapons2name[zp.spawn.bonus2[id]].."!")
		end
	elseif (player(id,"team")==1) then
	parse("equip "..id.." 86")
	end
end
addhook("hit","flash_hit")
function flash_hit(id,team,w,suspect)
	if (w == 86) then
		if (player(id,"team")==2) then
		hit86_id_x = player(id,'x')
		hit86_id_y = player(id,'y')
			parse("customkill "..id.." Infected "..suspect)
			parse("maket "..id)
			parse("setpos "..id.." "..hit86_id_x.." "..hit86_id_y)
		end
	end
end
addhook("die","die_drop")
function die_drop(id,team,x,y)
		local id_xtile = player(id,'tilex')
		local id_ytile = player(id,'tiley')
	if (player(id,"team")==1) then
	zp.kill.getbonus[id]= math.random(1,4)
		if (zp.kill.getbonus[id]==2) then
		parse("spawnitem 64 "..id_xtile.." "..id_ytile)
		elseif (zp.kill.getbonus[id]==3) then
		parse("spawnitem 32 "..id_xtile.." "..id_ytile)
		elseif (zp.kill.getbonus[id]==4) then
		parse("spawnitem 76 "..id_xtile.." "..id_ytile)
		end
	return 1
	end
end
addhook("buy","nobuy")
function nobuy(id)
	msg2(id," \169255000000 Buying are not allowed!@C")
	return 1
end