SN-VehicleMenu: A unique vehicle menu that allows you to quickly perform essential vehicle actions like turn the vehicle on/off and opening/closing doors.
Config
Config = {}
Config.ShowWindows = true
Config.ShowInsideLight = true
Config.FirstPersonLightOnly = true
function ToggleEngine(vehicle)
--TriggerEvent('qb-vehiclekeys:client:ToggleEngine') -- For qb-vehiclekeys checks if you have keys (You dont need the bottom code)
SetVehicleEngineOn(vehicle, (not GetIsVehicleEngineRunning(vehicle)), false, true)
end
function ToggleDoor(vehicle, doorID)
if GetVehicleDoorAngleRatio(vehicle, doorID) > 0.0 then
SetVehicleDoorShut(vehicle, doorID, false)
else
SetVehicleDoorOpen(vehicle, doorID, false)
end
end
function ToggleWindow(vehicle, windowID)
if Windows[windowID] then
RollUpWindow(vehicle, windowID)
Windows[windowID] = nil
else
RollDownWindow(vehicle, windowID)
Windows[windowID] = true
end
end
function ChangeSeat(ped, vehicle, SeatID)
SetPedIntoVehicle(ped, vehicle, SeatID)
end
Exports
exports['SN-VehicleMenu']:OpenVehicleMenu() --- Open menu
exports['SN-VehicleMenu']:ExitVehicleMenu() --- Force exit menu
(K) to open and switch between tabs
Features:
- 0.0 ms resmon (idle)
- Works with all vehicles
- Works with all frameworks
- Configurable
- Toogle engine
- Open/close doors
- Toggle inside light
- Switch between seats
- Supports vehicles with more than 4 seats
- Roll up/down windows
- Drag and drop
- Unique UI
Code is accessible | No |
Subscription-based | No |
Lines (approximately) | ~400 |
Requirements | None |
Support | Yes |