Forum

> > CS2D > Scripts > 3 pages menu request
Forums overviewCS2D overview Scripts overviewLog in to reply

English 3 pages menu request

2 replies
To the start Previous 1 Next To the start

old 3 pages menu request

hunter139
User Off Offline

Quote
hi all
i need a code for 3 pages menu

1-Page
8 selections
button 9 is Next Page


2-Page
7 selections
button 8 is Next Page
button 9 is previous page


3-Page
7 selections
button 8 is Previous Page

old Re: 3 pages menu request

Rainoth
Moderator 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
menu("pg1,1,2,3,4,5,6,7,8,Next Pg")
menu("pg2,1,2,3,4,5,6,7,Previous Pg,Next Pg")
menu("pg3,1,2,3,4,5,6,7,Previous Pg")

-- Put the above in where you want to call the menus.

addhook("menu","yuss")
function yuss(id,t,b)
	if t == "pg1" then
		if b==9 then
			menu("pg2,1,2,3,4,5,6,7,Previous Pg,Next Pg")
		end
	elseif t=="pg2" then
		if b==8 then
			menu("pg1,1,2,3,4,5,6,7,8,Next Pg")
		elseif b==9 then
			menu("pg3,1,2,3,4,5,6,7,Previous Pg,Next Pg")
		end
	elseif t=="pg3" then
		if b==8 then
			menu("pg2,1,2,3,4,5,6,7,Previous Pg,Next Pg")
		end
	end
end

Now you just have to put "else if b== NUMBER_FROM_ONE_TO_7_OR_8" in appropriate places and assign what those buttons do.
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview