Forum

> > CS2D > Scripts > How to make a basic menu?
Forums overviewCS2D overview Scripts overviewLog in to reply

English How to make a basic menu?

3 replies
To the start Previous 1 Next To the start

old How to make a basic menu?

XiBoS55
User Off Offline

Quote
I'm trying to make a lua script, but i don't know how to make a menu, so.. If you players know anything, reply. Mostly when you press a button and the menu appears.
edited 1×, last 10.07.14 07:21:34 pm

old Re: How to make a basic menu?

Mora
User Off Offline

Quote
I give menu with function, and menu with action:
action:
1
2
3
4
5
6
addhook("serveraction","sv")
function sv(id,action)
 if action==1 then
menu(id,"Menu,1,2,3,4,5,6,7,8,9|9 is max")
 end
end
function
1
2
3
function menuz(id)
 menu(id,"Menu,1,2,3,4,5,6,7,8,9|9 is max")
end

with action it will be:
1
2
3
4
5
6
7
8
9
10
addhook("serveraction","sv")
function sv(id,action)
 if action==1 then
menuz(id)
 end
end

function menuz(id)
 menu(id,"Menu,1,2,3,4,5,6,7,8,9|9 is max")
end

old Re: How to make a basic menu?

RedizGaming
GAME BANNED Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook("serveraction","example")
function example(id, act)
	if act == 1 then
		menu(id,'TEST,1,2,3,4,6,7,8,9')
	end
end

addhook("menu","example2")
function example2(id,title,button)
	if title == "TEST" then
		if button >= 1 or <= 9 then
			msg2(id,'Hello World!')
		end
	end
	return 1
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview