Forum

> > CS2D > Scripts > Pls Double Menu with one
Forums overviewCS2D overview Scripts overviewLog in to reply

English Pls Double Menu with one

4 replies
To the start Previous 1 Next To the start

old Pls Double Menu with one

eduxd0707
BANNED Off Offline

Quote
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
addhook("serveraction","EXPserveraction")
function EXPserveraction(id,action)
	if player(id, 'health') < 0 then return end
	if action == 1 then
		if not PLAYERS[id].Tutorial.inventory then
			message(id, "This is your inventory. You can equip or use items by clicking on them. You can press F3 to access your equipment.", "255128000")
			PLAYERS[id].Tutorial.inventory = true
		end
		inventory(id)
	elseif action == 2 then
		if not PLAYERS[id].Tutorial.inventory then
			message(id, "This is your equipment. You can unequip or use items by clicking on them.", "255128000")
			PLAYERS[id].Tutorial.inventory = true
		end
		equipment(id)
	elseif action == 3 then
		if PLAYERS[id].tmp.exhaust.use then
			return
		end
		PLAYERS[id].tmp.exhaust.use = true
		timer(CONFIG.EXHAUST.USE, "rem.useExhaust", tostring(id))
		local itemid = PLAYERS[id].Equipment[9]
		if itemid then
			local amount, items = itemcount(id, itemid)
			message(id, "Using " .. (amount == 0 and ("the last " .. ITEMS[itemid].name) or ("one of " .. fullname(itemid, amount+1))) .. "...@C", "000255000")
			ITEMS[itemid].func[1](id, 9, itemid, true)
			if amount > 0 then
				table.remove(PLAYERS[id].Inventory, items[1])
				PLAYERS[id].Equipment[9] = itemid
			end
		else
			message(id, "You can hold a rune and use F4 to cast it easily.", "255255255")
		end
	end
end

addhook("menu","EXPmenu")
function EXPmenu(id, title, button)
	if player(id, 'health') < 0 then return end
	if player(id, 'team') == 0 then return end
	if button == 0 then return end
	if title:sub(1,9) == "Inventory" then
		local page = #title-9
		if button == 9 then
			inventory(id, (page+1)%(math.ceil(CONFIG.MAXITEMS/5)))
		elseif button == 8 then
			inventory(id, (page-1)%(math.ceil(CONFIG.MAXITEMS/5)))
		elseif PLAYERS[id][itemid] ~= 0 then
			local itemslot = button+page*5
			local itemid = PLAYERS[id].Inventory[itemslot]
			itemactions(id, itemslot)
			return
		end
	elseif title:find "Actions" then
		local itemslot, itemid
		local equip = title:sub(1,5) == 'Equip'
		if equip then
			itemslot = #title-12
			itemid = PLAYERS[id].Equipment[itemslot]
		else
			itemslot = #title-11
			itemid = PLAYERS[id].Inventory[itemslot]
		end
		if button == 8 then
			message(id, "You see " .. fullname(itemid) .. ". " .. (ITEMS[itemid].desc or "") .. (ITEMS[itemid].level and "You need to be level " .. ITEMS[itemid].level .. " or above to equip it." or ""))
		elseif button == 9 then
			dropitem(id,itemslot,equip)
		else
			ITEMS[itemid].func[button](id,itemslot,itemid,equip)
		end
	elseif title == "Equipment" then
		itemactions(id,button,true)
	end
	return 
end
Please I am not able to find me this
I Need
F2 ~>inventory/Equipament

1
2
3
4
5
6
7
8
9
10
11
inventory(id)
	elseif action == 2 then
		if not PLAYERS[id].Tutorial.inventory then
			message(id, "This is your equipment. You can unequip or use items by clicking on them.", "255128000")
			PLAYERS[id].Tutorial.inventory = true
		end
		equipment(id)
	elseif action == 3 then
		if PLAYERS[id].tmp.exhaust.use then
			return
		end
edited 1×, last 17.10.13 04:59:53 pm

old Re: Pls Double Menu with one

omg
User Off Offline

Quote
if player(id,"health")<0

LMAO

thread, figure it out. u obviously cant put 2 menu in 1 serveraction but u can put a menu in another menu
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview