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
--Hooks:
addhook("serveraction","Inventoryserveraction")
addhook("menu","Inventorymenu")
--Functions:
function Inventoryserveraction(id,action)
	if action == 1 then
		menu(id,"Inventory,Check Inventory,Buy items")
end
end
function Inventorymenu(id,m,s)
	if (m=="Inventory") then
		if (s == 1) then
			menu(id,"Check inventory,Radar")
		elseif (s == 2) then
			menu(id,"Buy items,Medisuit,Ring of Hp,Speed cola,Air Strike")
		end
	end
	if (m=="Buy items") then
		if (s == 1) then
			if player(id, "money")>=2000 then
				parse("setmoney "..id.." "..player(id, "money")-2000)
				parse("equip "..id.." 82")
				msg2(id,"Medisuit lasts only one life!")
			else
				msg2(id,"You dont have enough money!")
			end
		end
		if (s == 2) then
			if player(id, "money")>=6000 then
				parse("setmoney "..id.." "..player(id, "money")-6000)
				parse("setmaxhealth "..id.." 150")
			else
				msg2(id,"You dont have enough money!")
			end
		end
		if (s == 3) then
			if player(id, "money")>=2700 then
				parse("setmoney "..id.." "..player(id, "money")-2700)
				parse("speedmod "..id.." 35")
				msg2(id,"Speed cola lasts only one life!")
			else
				msg2(id,"You dont have enough money!")
			end
		end
		if (s == 4) then
			if player(id, "money")>=6000 then
				parse("setmoney "..id.." "..player(id, "money")-6000)
				parse("equip "..id.." 76")
			else
				msg2(id,"You dont have enough money!")
			end
		end
	end
end