Left mouse key rebind

Hello
I try to make the mouse left clic do other thing than a punch.
either rebind punch to something else until i finish what i want and then rebind it back to left mouse clic.
or cancel what left mouse clic’s job kind of cancel event.

i want to make it using code note to rebind using gta v parameter menu cause i want it to be for all the server.

i have found this DisablePlayerFiring(player, true); but it does not trigger the left mouse clic unfortunately
any idea ?

Disable the left click with https://runtime.fivem.net/doc/natives/?_0xFE99B66D079CF6BC

And trigger your code with something like that ? https://runtime.fivem.net/doc/natives/?_0xE2587F8CBBD87B1D

It should do the work

Hi AvaN0x

Thx for your response, but how do i know if left button has been clicked cause DisableControlAction does ignore the event and then i can’t check for it.

what i want is do something different when left button is clicked, so i need to check first if mouse button is clicked and then dependiong on some boolean value (for example) i’ll do a special event, otherwize i’ll do a punch.

i think it need a kind of trick to do that.

1 Like

As i said it need a trick, actually the current frame ignore the click event so i need to do my job next frame.
thank you AvaN0x