Forum

> > CS2D > Scripts > Menu by Use Key
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Menu by Use Key

10 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Menu by Use Key

Jynxxx
User Off Offline

Zitieren
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".

alt Re: Menu by Use Key

Jynxxx
User Off Offline

Zitieren
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

alt Re: Menu by Use Key

DC
Admin Off Offline

Zitieren
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.

alt Re: Menu by Use Key

Jynxxx
User Off Offline

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

alt Re: Menu by Use Key

Dovahkin
User Off Offline

Zitieren
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 :))
1× editiert, zuletzt 21.12.11 14:52:00
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht