Installation and Setup
Installation
Follow the steps below to claim your resource and install it
Download Resource
Access the official Cfx.re portal and log in with the same Cfx.re account you used to make the purchase
In the list of granted assets, find Midnight-VehicleMenu download it
Add Resource to Server
Unzip the
md_carcontrol.zipfolder and place the extracted folder into your servers resources folder (or any sub folder)Open your servers
server.cfgfile and writeensure md-carcontrolanywhere after your framework is ensured. Alternatively, place the resource in any folder that is already ensured
Fuel Script Integration
The vehicle control UI displays the current fuel level. This resource offers direct support for cdn-fuel and legacy-fuel. It can also run standalone (no fuel script required) or be configured to work with any other third-party fuel script.
NO FUEL SCRIPT
Set Config
-- The fuel script used to display the vehicles fuel on the UI.
-- Supported: cdn-fuel, legacy-fuel, ox_fuel, nil. Check documentation to learn how to include any other script
Config.FuelScript = nilOX_FUEL
Set Config
-- The fuel script used to display the vehicles fuel on the UI.
-- Supported: cdn-fuel, legacy-fuel, ox_fuel, nil. Check documentation to learn how to include any other script
Config.FuelScript = 'ox_fuel'ANY OTHER FUEL SCRIPT
Set Config
Add Custom Fuel Reading Code
Open the shared functions file found in
shared/functions.luaEdit the last elseif statement in the given
GetFuelLevelfunction.The vehicle being checked is provided as a paramater (
veh).Utilize exports or any means from your custom fuel script to check how much fuel the vehicle has, and return the amount as a number between 0 and 100
Database Setup
Installing oxmysql
This resource uses oxmysql for all database interactions. To install, follow the instructions listed at https://overextended.dev/oxmysql.
Enabling Onesync
Follow this Guide to enable OneSync on your server. This is required to ensure proper synchronization of indicators between players.
Last updated