Forum
CS2D Scripts Trigger menu.Trigger menu.
12 replies 1
Jynxxx has written
Yes.
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
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
addhook("use","usebuttonworkaround") function usebuttonworkaround(id) local x,y=player(id,"tilex"),player(id,"tiley") if x==115 and y==133 then menu(id,"Trigger,Apocalypse|Zombie's,Aliens|Vortigaunt's,Headcrabs|Headcrab's,4 Ops|Soldier's") end end addhook("menu","_menu") function _menu(id,menu,button) if menu =="Trigger" then 	if button == 1 then 		parse("trigger zombies404") 		msg("©255000000Zombies!!") 	end 	elseif button == 2 then 		parse("trigger vortigaunt404") 		msg("©255000000ALiEEnS!!") 	end 	elseif button == 3 then 		parse("trigger headcrab404") 		msg("©255000000Headcrabs!") 	end 	elseif button == 4 then 		parse("trigger soldier404") 		msg("©255000000oMg?!") 	end end
What wrong with this then?
oops you posted while i was posting, anyway
Whats wrong with your script is missing 2 ends (maybe)
Add 2 ends at the bottom
--------------------------------------------------------
Old Post:
Yes, heres an example:
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
addhook("use","enddead_use") function enddead(id) local x,y=player(id,"tilex"),player(id,"tiley") if x==47 and y==11 then -- Replace 47 by tile X and 11 by tile Y for menu 1 menu(id,"Menu,Tigger 1,Tigger 2") elseif x==25 and y==41 -- Replace 25 by tile X and 41 by tile Y menu(id,"Menu 2,Tigger 3,Tigger 4) end end
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
addhook("menu","enddead_menu") function enddead_menu(id,title,buton) if title=="Menu" then if buton==1 then parse("toggle ButtonNameOrDynWallName") -- replace ButtonNameOrDynWallName by the name of the dynwall/button entity in the map elseif buton==2 then parse("toggle ButtonNameOrDynWallName") -- same end end end end
Good luck.
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
addhook("serveraction","A") function A(id,action) 	if action == 1 then 		menu(id,"Menu,Dynwall") 	end end addhook("menu","B") function B(id,title,button) 	if button == 1 then 		parse("trigger dynwall") 	end end
Here this works.
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
addhook("use","enddead_use") function enddead_use(id) local x,y=player(id,"tilex"),player(id,"tiley") if x==115 and y==133 then -- Replace 47 by tile X and 11 by tile Y for menu 1 menu(id,"Trigger,Apocalypse|Zombie's,Aliens|Vortigaunt's,Headcrabs|Headcrab's,4 Ops|Soldier's") elseif x==25 and y==41 -- Replace 25 by tile X and 41 by tile Y menu(id,"Menu 2,Tigger 3,Tigger 4) end end end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
addhook("menu","enddead_menu") function enddead_menu(id,title,buton) if title=="Trigger" then if buton==1 then 				parse("trigger zombies404") 				msg("©255000000Zombies!!") -- replace ButtonNameOrDynWallName by the name of the dynwall/button entity in the map 			elseif buton==2 then 				parse("trigger vortigaunt404") 				msg("©255000000ALiEEnS!!")	 			elseif button == 3 then 				parse("trigger headcrab404") 				msg("©255000000Headcrabs!")	 			elseif button == 4 then 				parse("trigger soldier404") 				msg("©255000000oMg?") end end end end end end
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
addhook("menu","enddead_menus") function enddead_menus(id,title,buton) if title=="Menu 2" then if buton==1 then 				parse("trigger zombies404") 				msg("©255000000Zombies!!") -- replace ButtonNameOrDynWallName by the name of the dynwall/button entity in the map 			elseif buton==2 then 				parse("trigger vortigaunt404") 				msg("©255000000ALiEEnS!!")	 			elseif button == 3 then 				parse("trigger headcrab404") 				msg("©255000000Headcrabs!")	 			elseif button == 4 then 				parse("trigger soldier404") 				msg("©255000000oMg?") end end end end end end
1
function usebuttonworkaround(id,x,y)
Try this.
Glix has written
Still doesn't work...
Use my one
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
addhook("serveraction","A") function A(id,x,y) local x,y=player(id,"tilex"),player(id,"tiley") 	if x==10 and y==10 then -- change this menu(id,"Menu,Dynwall") end end addhook("menu","B") function B(id,title,button) if button == 1 then parse("trigger dynwall") end end
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
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
addhook("use","usebuttonworkaround") function usebuttonworkaround(id) local x,y=player(id,"tilex"),player(id,"tiley") if x==51 and y==9 then -- Replace 51 by tile X and 9 by tile Y for menu 1 menu(id,"Trigger,Apocalypse|Zombie's,Aliens|Vortigaunt's,Headcrabs|Headcrab's,4 Ops|Soldier's") elseif x==25 and y==41 then -- Replace 25 by tile X and 41 by tile Y menu(id,"Menu 2,Tigger 3,Tigger 4") end end addhook("menu","enddead_menu") function enddead_menu(id,title,buton) if title=="Tigger" then if buton==1 then parse("trigger zombies404") msg("©255000000Zombies!!") -- replace ButtonNameOrDynWallName by the name of the dynwall/button entity in the map elseif buton==2 then parse("trigger vortigaunt404") msg("©255000000ALiEEnS!!") elseif button == 3 then parse("trigger headcrab404") msg("©255000000Headcrabs!") elseif button == 4 then parse("trigger soldier404") msg("©255000000oMg?!!") end end end
edited 2×, last 26.08.12 09:27:23 am
EndDead has written
Ok i wasted my time and tested in-game, and heres the full script:
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
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
addhook("use","usebuttonworkaround") function usebuttonworkaround(id) local x,y=player(id,"tilex"),player(id,"tiley") if x==51 and y==9 then -- Replace 51 by tile X and 9 by tile Y for menu 1 menu(id,"Trigger,Apocalypse|Zombie's,Aliens|Vortigaunt's,Headcrabs|Headcrab's,4 Ops|Soldier's") elseif x==25 and y==41 then -- Replace 25 by tile X and 41 by tile Y menu(id,"Menu 2,Tigger 3,Tigger 4") end end addhook("menu","enddead_menu") function enddead_menu(id,title,buton) if title=="Tigger" then if buton==1 then parse("trigger zombies404") msg("©255000000Zombies!!") -- replace ButtonNameOrDynWallName by the name of the dynwall/button entity in the map elseif buton==2 then parse("trigger vortigaunt404") msg("©255000000ALiEEnS!!") elseif button == 3 then parse("trigger headcrab404") msg("©255000000Headcrabs!") elseif button == 4 then parse("trigger soldier404") msg("©255000000oMg?!!") end end end
Thank you my lord!
EDIT :
Fuck this i give up. none of these work!
Black Wolf has written
Thank you my lord!
EDIT :
Fuck this i give up. none of these work!
EndDead has written
Ok i wasted my time and tested in-game, and heres the full script:
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
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
addhook("use","usebuttonworkaround") function usebuttonworkaround(id) local x,y=player(id,"tilex"),player(id,"tiley") if x==51 and y==9 then -- Replace 51 by tile X and 9 by tile Y for menu 1 menu(id,"Trigger,Apocalypse|Zombie's,Aliens|Vortigaunt's,Headcrabs|Headcrab's,4 Ops|Soldier's") elseif x==25 and y==41 then -- Replace 25 by tile X and 41 by tile Y menu(id,"Menu 2,Tigger 3,Tigger 4") end end addhook("menu","enddead_menu") function enddead_menu(id,title,buton) if title=="Tigger" then if buton==1 then parse("trigger zombies404") msg("©255000000Zombies!!") -- replace ButtonNameOrDynWallName by the name of the dynwall/button entity in the map elseif buton==2 then parse("trigger vortigaunt404") msg("©255000000ALiEEnS!!") elseif button == 3 then parse("trigger headcrab404") msg("©255000000Headcrabs!") elseif button == 4 then parse("trigger soldier404") msg("©255000000oMg?!!") end end end
Thank you my lord!
EDIT :
Fuck this i give up. none of these work!
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
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
addhook("use","_use") function _use(id,x,y) local x,y=player(id,"tilex"),player(id,"tiley") if x==51 and y==9 then menu(id,"Trigger,Apocalypse|Zombie's,Aliens|Vortigaunt's,Headcrabs|Headcrab's,4 Ops|Soldier's") elseif x==16 and y==7 then menu(id,"Menu 2,Tigger 3,Tigger 4") end end addhook("menu","_menu") function _menu(id,title,button) if title=="Tigger" then if button == 1 then parse("trigger zombies404") msg("©255000000Zombies!!") elseif button == 2 then parse("trigger vortigaunt404") msg("©255000000ALiEEnS!!") elseif button == 3 then parse("trigger headcrab404") msg("©255000000Headcrabs!") elseif button == 4 then parse("trigger soldier404") msg("©255000000oMg?!!") 				end 		end end
Fixed.
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
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
addhook("use","usebuttonworkaround") function usebuttonworkaround(id) 	local x,y=player(id,"tilex"),player(id,"tiley") 	if x==115 and y==133 then 		menu(id,"Trigger,Apocalypse|Zombie's,Aliens|Vortigaunt's,Headcrabs|Headcrab's,4 Ops|Soldier's") 	end end addhook("menu","_menu") function _menu(id,menu,button) 	if menu =="Trigger" then 		if button == 1 then 			parse("trigger zombies404") 			msg("©255000000Zombies!!") 		elseif button == 2 then 			parse("trigger vortigaunt404") 			msg("©255000000ALiEEnS!!") 		elseif button == 3 then 			parse("trigger headcrab404") 			msg("©255000000Headcrabs!") 		elseif button == 4 then 			parse("trigger soldier404") 			msg("©255000000oMg?!") 		end 	end end
1