Hello!
I love using REGISTER_KEY_MAPPING, but there is one problem with it.
Currently I display key hints using NUI. Problem is, that there is currently no way to get, what key did user bind to specific action.
If there would be function char* GET_KEY_MAPPING( char* commandString) we could simply get the key and display it. So I would just do:
RegisterKeyMapping('+handsup', 'Hands Up', 'keyboard', 'i')
local registeredKey = GetKeyMapping("+handsup")
print("Press " .. registeredKey .. " to put your hands up!")
Would be really great, also, is possibility of binding multiple keys planned?
The problem i see is that if i bind more actions for the same key and then i just one, all others are removed.
For example if I bind 3 commands on key “E” and then edit one of them in settings to “Z”, two others are just removed. Is this just a GTA thing? Would be cool, if two others just stayed on “E”
Hm, might be a bug with the GTA menu integration. If you can consistently cause this across versions maybe post exact steps in #general-discussion:bug-reports so it can be tracked.
You are doing it wrong. No matter the name of the function.
You need use this: FiveM Hash Generator eco_fishing_ngs = ~INPUT_AD4D66C2~ fishing_gs = ~INPUT_19077CB2~
And this text you subtract ~INPUT_ and ~.
Then adds 0x at the beginning. (This is to be interpreted as a hexadecimal number)
The final result: eco_fishing_ngs key = GetControlInstructionalButton(0, 0xAD4D66C2, 1)
Also say that if you change the name of the function (eco_fishing_ngs, RegisterKeyMapping is clear for this function, for all players. Because AD4D66C2 = eco_fishing_ngs)
If you like more information go to my post for this