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
function inArr(s)
	local j={}
	for i=1,s do
		j[i]=0
	end
	return j
end
level=inArr(32)
vehicle=inArr(32)
function xMsg2(pl,message)
	parse('sv_msg2 '..pl..' '..message)
end
function xEqp(pl,wpn)
	parse('equip '..pl..' '..wpn)
	parse('setweapon '..pl..' '..wpn)
end
function xStHp(pl,pwr)
	parse('setmaxhealth '..pl..' '..pwr)
end
function xTimer(time,pl)
	timer(time,"xVehicle",pl)
end
function xVehicle(pl)
	freeimage(pl)
	vehicle[pl]=image("gfx/tank.png",1,0,pl+200)
	xEqp(pl,48)
	xStHp(pl,250)
end
addhook("kill","xKill")
function xKill(killer,victim,weapon)
	level[killer]=level[killer]+1
	level[victim]=0
	if level[killer]==5 then
		xTimer(2000,killer)
		xMsg2(killer,"©000255000You killed five players: You will get a Tank!@C")
	end
end
addhook("die","xDie")
function xDie(pl,k,wpn,x,y)	
	freeimage(pl)
end