Hey!
Currently I am trying to get the current key binding for a custom binding set by RegisterKeyMapping
. I have read here Create GET_KEY_MAPPING - #2 by TheIndra that every key registered with RegisterKeyMapping
can be accessed by the joaat hash of the command.
So when I register a key mapping like this:
RegisterKeyMapping('+handsup', 'Hands Up', 'keyboard', 'i')
and caluclate the joaat hash for handsup
:
JOAAT hash for "handsup" is "7066e9f8" | Md5Calc.com
I would expect that ~INPUT_7066E9F8~ in a help text should show me the key âIâ. But it is just blank. ~INPUT_CONTEXT~ on the other hands shows the E button.
SetTextComponentFormat("STRING");
AddTextComponentString("Key: ~INPUT_7066E9F8~");
DisplayHelpTextFromStringLabel(0, 0, 1, -1);
In addition to that, deterministic_bubble wrote in the same post, that to get the normal keys, there is a function âget instructional buttonâ.
I would guess that he means GET_CONTROL_INSTRUCTIONAL_BUTTON - Cfx.re Docs
GetControlInstructionalButton(padIndex: number, control: number, p2: Player);
but that takes an integer as the second parameter? I already tried to convert the joaat hash to decimal (1885792760) but that returns null.
Am I missing something here or is this considered a bug?