1× editiert, zuletzt 10.07.14 19:21:34
Forum
CS2D Scripts How to make a basic menu?How to make a basic menu?
3 Antworten 1
action:
1
2
3
4
5
6
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
1
2
3
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
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
Hook: menu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
1