Forum

> > CS2D > Scripts > How to make a basic menu?
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch How to make a basic menu?

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt How to make a basic menu?

XiBoS55
User Off Offline

Zitieren
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.
1× editiert, zuletzt 10.07.14 19:21:34

alt Re: How to make a basic menu?

Mora
User Off Offline

Zitieren
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

alt Re: How to make a basic menu?

RedizGaming
GAME BANNED Off Offline

Zitieren
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
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht