How to change a command in chat for key pressed script?

I want to put this script to work using G on a keyboard, I tried several ways, however, the ideas I had in mind of how to do, did not work, I am very grateful for who helps me

here is the script: [Release][FX] Fix-Clean Vehicle Command

Hello,

you should have everything you need here :

https://cookbook.fivem.net/2020/01/06/using-the-new-console-key-bindings/
https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/

Basic thing is :
if IsControlJustReleased(0, XX) then
–action/function
end

replace XX with the number of the button

I’ve tried it but it doesn’t work, you can try it

I’ve tried it but it doesn’t work, you can try it
Bro but thanks

Should be something like that :

RegisterKeyMapping("fix", "Fix vehicle", "keyboard", "G")

Haven’t tested though

Maybe iam doing something wrong, but does not work
maybe you can try it and then send to me edited file

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.