[SOLVED] IsControlJustReleased C#

Hi,

I want to show menu when player presse “L” for example.

I don’t find how to do it…

I know how use it like that :
Game.IsControlJustReleased(1, CitizenFX.Core.Control.Phone)

But when i try :
Game.IsControlJustPressed(1, 182)

It does’nt works, obviously due to the prototype.

Can you help me ?

Thanks a lot.

if (Game.IsControlJustReleased(1, Control.VehicleHeadlight) exemple

yes i agree, but i don’t want to use the Control enum.
If we stay on my example, how would you do to map a “L” touch ? without enum ? Maybe, we can imagine HeadLight is already used.

Thanks

and why don’t you?

not, controls aren’t keys

In fact i want to define a specific key like in LUA script.
Because it’s easier to explain, instead of “use horn to open menu” :slight_smile:

I already have a menu binded on phone control.

Ok, i found :

(Game.IsControlJustReleased(1, (Control)182)

(Game.IsControlJustReleased(1, (Control)182)

Working ?

Yes it’s works fine.

1 Like