you could do that but that is not something I would add to this script
I did make this snippet you could add to your script
if IsPedInAnyVehicle(PlayerPedId(), false) then
if ( IsControlJustReleased( 0, 47 ) or IsDisabledControlJustReleased( 0, 47 ) ) and GetLastInputMethod( 0 ) then -- Key to open NUI https://docs.fivem.net/docs/game-references/controls/
DoorControl(0)
end
end
Paste this on a new line at line 15 of the client.lua file
Hello, I tried it again in game and I tried to capture a small clip for you. Before loading in I made sure I was in a normal AI car and before I put start vehcontrol-master at the top of my server.cfg to load the resource first. There was also no errors in F8 and console.
For the clip, I tried using ] which opened the menu but than I was not able to click anything as shown in the video. What I did not capture is once i press esc the menu closes but than it looks like my mouse is still shown like the menu is open, its hard to explain. For that I have to disconnect and reload in.
I hope you could help me with this problem! Thanks
I have added the ability to call the menu from another resource in the newest version (1.1.3) you can read on how to call it above and in the readme file
the indication of the engine being on when clicked wonāt be put in due to the fact it would take a lot more coding and back checking that I donāt want to do. I want to keep this script as simple as possible to keep the resource load on the server down as much as possible
Is there a way to disable opening the menu with scroll wheel up? Iāve looked at the FiveM controls in the game references, the config.lua and client.lua, but I canāt seem to find anything that disables this.
If you change the key bind to something else it works fine and does not open with the scroll wheel, I have given an example of the change to the keybind from ā]ā to āMā below. Below is lines 21-25 from client.lua
if IsPedInAnyVehicle(PlayerPedId(), false) then
if ( IsControlJustReleased( 0, 244 ) or IsDisabledControlJustReleased( 0, 244 ) ) and GetLastInputMethod( 0 ) and not IsPauseMenuActive() then -- Key to open NUI https://docs.fivem.net/docs/game-references/controls/
openVehControl()
end
end
I have tried disabling the scroll wheel but the menu still shows, I donāt know why it does but when I rebound the key to something else it does not open with the scroll wheel. There is nowhere in the code of the script (Lua or JS) that could trigger the menu to open with the scroll wheel. This may be an auxiliary key bind in GTA causing this issue. Iām guessing this issue is coming up because your using the default weapon selections or you have bound the scroll wheel to some other resource.