Scripts resistant to changing the default binding

I have a problem with the default button binding on my server(Qb-core). So far, in the client->main.lua file, changing the “RegisterKeyMapping” line helped and the keys were correctly set as I wanted by default. However, I have a problem with the “pma-voice” and “nui_drawtext” scripts. In the first script,microphone volume button, in the second, the scene creation button does not allow for changes, and despite the change in main.lua, the binding remains at the previous values. As if it was bound somewhere else. Please help. Below are the lines that stubbornly refuse to change.

“Pma-voice”
RegisterKeyMapping(‘+cycleproximity’, ‘Cycle Proximity’, ‘keyboard’, GetConvar(‘voice_defaultCycle’, ‘F5’))

“Nui_drawtext”
RegisterKeyMapping(‘createscene’, ‘Create Scene’, ‘INSERT’, Config.CreateSceneKey)
RegisterKeyMapping(‘deletescene’, ‘Delete Scene’, ‘DELETE’, Config.DeleteSceneKey)

New players are not getting these key mappings? Key mappings are set one time per command. Once the map is set no code will change it. The player must change it in their keybindings.

1 Like

I understand what you wrote. For me, the mystery is why in the case of only these two scripts the player has to change the button mappings, while in the case of all the others I could predefine them accordingly in client->main.lua. In the case of pma-voice and nui_drawtext, the change in main.lua does not seem to load after the change. I would like to find out where to look for a solution so that a new player can have these keys the way he wants. I don’t remember that there was a need to bind such buttons on servers - they are pre-defined and of course can be changed, but someone created a general binding for the server.

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