Is there also going to be a good way to “clean” up the RegisterCommand settings that are being stored in the config file in %appdata%\CitizenFX\fivem.cfg
After testing the RegisterCommand I saw that ALL the options that I tested with are now stored in the file, when pressing the button it will send ALL of those commands.
I would expect after the client logs out those keybindings are being “removed” from the fivem.cfg file
I would expect there to be a command RemoveCommand that can be called when the resource stops / server stops that will remove that keybinding.
Another way of doing it would be to make a separate config file that gets loaded after the fivem.cfg is loaded which can be “deleted” after you logoff.
Regarding rebinding, my understanding of this function is that we can “force” keybinding onto keys we can’t normally use as they don’t have keybinding in the original game like F4. Being able to bind those keys to commands makes it less hard as a resource developer to come up with smart tricks for all the keybinding that we can bind.
I was going to explain why I think RegisterCommand should be a command that allows resource developers to force certain keys onto the end users but reading your response makes it clear that the command is not meant to force keys onto the end user.
The idea behind the "cleaning" is that many keys within the resources I use tend to change on a weekly basis to battle the "autoclickers" and I was hoping that with this command the possibility to take that away would appear.
??? and you’re trying to fix a behavior issue (your server is boring -> people want to automate tedious tasks) in a weird way (get rid of users’ ability to build muscle memory or remember what key does what as a side effect) instead of relying on better detection for automated input (is anything else happening at the same time? maybe rate limit what people do? maybe make your server less boring)
I was going to make a extensive post here but seems that you already made the point from the FiveM developers side so I am going to rely on the fact that developers know best.