Forum

> > CS2D > Scripts > Menu by Use Key
Forums overviewCS2D overview Scripts overviewLog in to reply

English Menu by Use Key

10 replies
To the start Previous 1 Next To the start

old Menu by Use Key

Jynxxx
User Off Offline

Quote
Ok what i want to know is how to trigger a menu by using a key like E. But the person has to be on the tile "x" and "y".

old Re: Menu by Use Key

Jynxxx
User Off Offline

Quote
This is what i got but it doesn't work when i press E
1
2
3
4
5
6
addhook("use","shop")
function shop(id,event,data,x,y)
	if (x == 43 and y == 62) then
		menu(id,"Shop,Weapons,Equipment,Weapon Sets")
	end
end

old Re: Menu by Use Key

DC
Admin Off Offline

Quote
the use hook probably only works if there is a button or something like that which can actually be used.

you have to use the server action keys and hooks.

old Re: Menu by Use Key

Jynxxx
User Off Offline

Quote
Got it i just had to put a Trigger_Use on the map. Thanks for the help guys.

old Re: Menu by Use Key

Dovahkin
User Off Offline

Quote
Come on Dude


1
2
3
4
5
6
addhook("use","trigger")
function trigger(id,x,y)
	if (x == 43 and y == 62) then
		menu(id,"Shop,Weapons,Equipment,Weapon Sets")
	end
end


Im not sure if it will work :))
edited 1×, last 21.12.11 02:52:00 pm
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview