I've put it to work, to show all the menus, however cmds won't execute :@.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
eqpage = 0
function ekwi(id,key) -- hooked to serveraction
if (key == 3) then
	menu(id,"Menu,Inventory,Status,stuff,even more stuff")
	end
end
function bpress(id, tit, but)
	if(tit == "Menu") then
		if (but == 1) then
			menu(id,"Inventory "..eqpage..","..ekwit[eqpage]..","..ekwit[eqpage+1]..","..ekwit[eqpage+2]..","..ekwit[eqpage+3]..","..ekwit[eqpage+4]..","..ekwit[eqpage+5]..",".."Previous page"..",Next page"..",Back to menu")
			if(but == 7) and (eqpage >= 0) then -- cmds here don't work
				eqpage = eqpage - 1
			elseif(but == 8) then -- cmds here don't work
				eqpage = eqpage + 1 -- cmds here don't work
			elseif(but == 9) then
				msg2(0,"tu bedzie funkcja wracajaca do poczatku") -- cmds here don't work
			end
			elseif (but == 2) then
				menu(id,"Status, Slots: ".. "128" ..",shit,kvnt,prik")
		end
	end
end
@edit, fixed it a little, still does the same thing
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
eqpage = 0
function ekwi(id,key) -- hooked to serveraction
if (key == 3) then
	msg2(0,"test")
	menu(id,"Menu,Inventory,Status,stuff,even more stuff")
	end
end
function bpress(id, tit, but)
	if(tit == "Menu") then
		if (but == 1) then
			msg2(0,"test")
			menu(id,"Inventory,".." "..eqpage..","..ekwit[eqpage]..","..ekwit[eqpage+1]..","..ekwit[eqpage+2]..","..ekwit[eqpage+3]..","..ekwit[eqpage+4]..","..ekwit[eqpage+5]..",".."Previous page"..",Next page"..",Back to menu")
		elseif(tit == "Inventory") then
			if(but == 7) then -- cmds here don't work
				eqpage = eqpage - 1
				msg2(0,"test")
			elseif(but == 8) then -- cmds here don't work
				eqpage = eqpage + 1 -- cmds here don't work
				msg2(0,"test")
			elseif(but == 9) then
				msg2(0,"test") -- cmds here don't work
			end
		elseif (but == 2) then
				menu(id,"Status, Slots: ".. "128" ..",shit,kvnt,prik")
				msg2(0,"test")
		end
	end
end
@edit2 YEAAAHH BABYY! I have made it! :):):)smileyface:). Here is the code if anyone wondered.
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
eqpage = 0
function ekwi(id,key) -- hooked to serveraction
if (key == 3) then
	msg2(0,"open menu")
	menu(id,"Menu,Inventory,Status,stuff,even more stuff")
	end
end
function bpress(id, tit, but)
	if(tit == "Menu") then
		if (but == 1) then
			msg2(0,"open inventory")
			menu(id,"Inventory".." "..eqpage..","..ekwit[eqpage]..","..ekwit[eqpage+1]..","..ekwit[eqpage+2]..","..ekwit[eqpage+3]..","..ekwit[eqpage+4]..","..ekwit[eqpage+5]..",".."Previous page"..",Next page"..",Back to menu")
		end
	elseif(tit == "Inventory".." "..eqpage) then
			if(but == 7) then -- cmds here don't work
				eqpage = eqpage - 1
				msg2(0,"button 7")
			elseif(but == 8) then -- cmds here don't work
				eqpage = eqpage + 1 -- cmds here don't work
				msg2(0,"button 8")
			elseif(but == 9) then
				msg2(0,"button 9") -- cmds here don't work
			end
		elseif (but == 2) then
				menu(id,"Status, Slots: ".. "128" ..",shit,kvnt,prik")
				msg2(0,"open status")
	end
end
@edit4 I have made it, it works and all the stuff, but i need to shorten
1
menu(id,"Inventory".." "..tostring(math.floor(eqpage/6)+1)..","..ekwit[eqpage]..","..ekwit[eqpage+1]..","..ekwit[eqpage+2]..","..ekwit[eqpage+3]..","..ekwit[eqpage+4]..","..ekwit[eqpage+5]..",".."Previous page"..",Next page"..",Back to menu")
this cmd, becouse i have to copy it multiple times, and also change it sometimes, and that's pain in the ass. What can i do to write it once, then link it like variable? edited 4×, last 27.01.15 04:16:57 pm