VehContol is a NUI vehicle control script, It is currently a standalone script that does not have any dependencies and is a drop in to any server.
Control
Hood
Trunk
Doors
Windows
Interior Light
Change Seats
Leave Engine Running on Exit
Bomb Bay Doors
NUI Controls
Open - Script Default: HOME
Script Default can be changed via config
Client changeable via Settings->Keybinds->FiveM game menu
Close - ESC
Commands
/engine - Start/Stop Vehicle Engine
/hood - Open/Close Hood
/trunk - Open/Close Trunk
/seat [1-4]- Move Seat
/door [1-4] - Open/Close Door
/window [1-4] - Roll Up/Down Window
/windowfront - Roll Up/Down Front Windows
/windowback - Roll Up/Down Back Windows
/windowall - Roll Up/Down All Windows
/vehcontrolclose - Close NUI (in F8 if stuck open)
Exporting
Exporting and Events
The following ways can be used to open the menu from another resource depending on how the resource is coded
Open menu from another resource with exports
exports.vehcontrol:openExternal()
Open menu from another resource with events
TriggerEvent("vehcontrol:openExternal")
Config
UseCommands [true/false] - Allow the use of /commands
DisableSeatShuffle [true/false] - Allow auto-seat shuffle from passenger to driver
LeaveRunning [true/false] - Allow the engine to keep running on exit of the vehicle with a long F keypress
DefaultOpen - This is they default key to open the menu, client can change in the game menu (Settings->Key Binds->FiveM) - Usable Key List Here
WARNING
You must change the folder after extraction from “vehcontrol-master” to “vehcontrol” or your NUI menu will not work when you push a button!
There’s NOTHING wrong with being inspired by others… It’s when people are a script kiddy and copy others scripts and try to take credit for code they didn’t write then that of course is an issue… Move on about your life man…
We will be confirming with NoPixel devs if this is indeed stolen, while we be doing that please refrain from commenting this has been stolen from any leak.
Thank you.
If you actually look at the code then you will see the code is different. I understand what crunchie is saying, especially when a lot of ppl now a days are copying code and saying its theirs, but if you actually really look at it, it is different. Just really the design is the same but not at the same time
When you play with a Controller, when you push up on the control stick it opens the menu. You can use the following code below so that it disables that controller controls so it doesn’t interfere with people using controllers
From this:
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsPedInAnyVehicle(PlayerPedId(), false) then
if IsControlJustReleased(0, 40) then -- Key to open NUI https://docs.fivem.net/docs/game-references/controls/
openVehControl()
end
end
end
end)
to this:
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsPedInAnyVehicle(PlayerPedId(), false) then
if ( IsControlJustReleased( 0, 40 ) or IsDisabledControlJustReleased( 0, 40 ) ) and GetLastInputMethod( 0 ) then -- Key to open NUI https://docs.fivem.net/docs/game-references/controls/
openVehControl()
end
end
end
end)
works good. only thing i see rn is that once you change seats from the driver seat you cant go back unless at least for me i have to use a /shuff script.