[Release] [Standalone] VehControl NUI Menu

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

Thanks! Works like a charm!

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

the resource is named wrong, change the folder from ā€œvehcontrol-masterā€ to just ā€œvehcontrolā€, this is why your buttons are not working

Hi so for any Nordic keyboard users trying to find what key it is to open. its (ĀØ~^) the one right of (ƅ)

Hi, do you know how I could remove the ā€œ]ā€ keybind to open the menu and replace it with an entry to a radial menu I have?

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

thank you

css referes to a ā€œcarbon.jpgā€ that I do not see in images.

Also when is clicked (like engine) how can be make it green?

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

Thanks for the new update, works perfectly with my radial menu now.

The folder name can only be ā€œvehcontrolā€

1 Like

Hi, u got one for the engine also with ā€™ as the shortcut? :smiley: ^^

read the comment on that line in the source code, it shows you where to get the key codes

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.

1 Like

How do I change the code when I turn off the engine automatically when I sit in the car?

Did you ever get an answer to this? I need to disable it also, itā€™s a pain.

Change the keybind that opens the menu, you can find out how todo that in the wiki on the github page

Still didnā€™t find out how to change it from mouse wheel upā€¦ It still does it even if you change the button to something else on the keyboard.

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.