Hi,
I’m currently trying to display keys in the NUI layer of the game, it seems like the GTA system is very well done, except we can’t get the key name from the control id or the control name.
Exemple : I want to display the E key in an interface present to the player to make a tutorial on how to use the server, the control id is 38, the control name is INPUT_PICKUP
I can either :
-
Tell the player the key is E, but he could have changed the bind and the presented key is false
-
Use a notification prompt, or instructionnal buttons that are from the game, these GTA5 interfaces can translate ~INPUT_PICKUP~ into
My examples use cases :
- Redesigning the instructionnal buttons from GTA into NUI layer, so we can change key design, displayed positions, add images around the keys
- Redesigning the help notification buttons (same notes)
- Make tutorials on how to use the scripts/server
- Do statistical analysis on players : If all players change X bind to Y, I would rather have it Y by default in my script
Cons :
- Could be used by weird anticheats or bad actors to detect bad behavior ?
- Could be used by weird server admins to know if the player is using QWERTY or AZERTY keyboard layout
- Could be used by bad developers to not use the RegisterKeybind system developed by FiveM, or make system around it
What i’m imagining :
GetKeyFromControl(0, 38) → returns t_E
I’m probably missing some parts that could make this either impossible, or very bad, but I have to try suggesting it
This is clearly low priority.
Thanks for all your work