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
pl = {};
pl.points = {};
function gmEquip(id)
	parse("spawnitem 60 "..player(id,"tilex").." "..player(id,"tiley"));
	local x, y = player(id,"x"),player(id,"y");
	parse("setpos "..id.." 1 1");
	parse("setpos "..id.." "..x.." "..y);
end
addhook("join", "_join")
function _join(id)
pl.points[id] = 0;
end
addhook("kill", "_kill")
function _kill(id)
pl.points[id] = pl.points[id]+1;
end
addhook("serveraction", "_sa")
function _sa(id, action)
if action == 1 then
menu(id, "Weapons List, Gas Mask | 5 Points, Kevlar+Helm | 10 Points, P228 | 5 Points, Five-Seven | 10 Points, Mac-10 | 25 Points, AK-47 | 40 Points");
end
end
addhook("menu", "_menu")
function _menu(id, title, button)
if title == "Weapons List" then
if button == 1 and pl.points[id] >= 5 then gmEquip(id); pl.points[id] = pl.points[id]-5;
elseif button == 2 and pl.points[id] >= 10 then parse("equip "..id.." 58"); pl.points[id] = pl.points[id]-10;
elseif button == 3 and pl.points[id] >= 5 then parse("equip "..id.." 4"); pl.points[id] = pl.points[id]-5;
elseif button == 4 and pl.points[id] >= 10 then parse("equip "..id.." 6"); pl.points[id] = pl.points[id]-10;
elseif button == 5 and pl.points[id] >= 25 then parse("equip "..id.." 23"); pl.points[id] = pl.points[id]-25;
elseif button == 6 and pl.points[id] >= 40 then parse("equip "..id.." 30"); pl.points[id] = pl.points[id]-40;
else msg2(id, "\169250000000You don't have enough points!");
end
end
end
addhook("leave", "_leave")
function _leave(id)
pl.points[id] = 0;
end
addhook("ms100", "_ms100")
function _ms100()
	for _, id in pairs(player(0, "table")) do
		parse("hudtxt2 "..id.." 1 \"\169255255255Points: "..pl.points[id].."\" 100 400 0");
	end
end