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
--------------------------------------------------------------------------------
--Diablo script for CS2D by Ultimate Software --
--Beta 1	26.06.2011 00:00								 --
--------------------------------------------------------------------------------
if sample==nil then sample={} end
diablo={}
function initArray(m)
	local array = {}
	for i = 1, m do
		array[i]=0
	end
	return array
end
he=initArray(32)
--add where name of weapon example:
--m4a1=initArray(32)
--ak47=initArray(32)
--( "--" is comment!!!)
addhook("buy","diablo_buy")
function diablo_buy(pl,weapon)
	if weapon==51 then
	parse("killplayer "..pl)
	he[pl]=1
	--add where number(id) of weapon(see it in map editor)
	--example:
	--elseif weapon==34 then
	--parse("killplayer "..pl)
	--m4a1[pl]=1
	--elseif weapon==33 then
	--parse("killplayer "..pl)
	--ak47[pl]=1
	end
end
addhook("spawn","diablo_spawn")
function diablo_spawn(pl)
	if he[pl]==1 then
	parse("equip "..pl.." 51")
	he[pl]=0
	--write where as it writen in example:
	--elseif m4a1[pl]==1 then
	--parse("equip "..pl.." 34")
	--m4a1[pl]=0 L_______the number(id) of weapon
	--elseif ak47[pl]==1 then
	--parse("equip "..pl.." 35")
	--ak47[pl]=0 L_______the number(id) of weapon
	end
end