Installation
JG Vehicle MileageFree on GitHub
Installation
Install dependencies
Enable OneSync and make sure you have the latest versions of ox_lib & oxmysql installed on your server.
Download the resource
Download from GitHub by going to the latest release page & clicking "Source code (zip)".
Rename the folder
Unzip the downloaded file & rename the folder to jg-vehiclemileage.
Move the resource
Drag the script folder (jg-vehiclemileage) into a new folder called [jg] within your server's resources folder.
Start the resource
In your server.cfg, add a new line after all your other resources have started:
ensure [jg]Strict statebag mode
jg-vehiclemileage supports setr sv_stateBagStrictMode true. The server updates the odometer state, so clients do not need permission to write statebags. Mileage calculation and saving are unchanged.
Mileage exports still return kilometres. Config.Unit controls the display unit. When using JG Mechanic, update both resources together and start jg-vehiclemileage first.
If you received an error saying [SQL ERROR]
JG Vehicle Mileage tries to automatically make the required database changes. In some cases, this automatic installation fails and you need to make the changes manually.
Head into the install folder within jg-vehiclemileage. Run the run-qb.sql (QBCore/Qbox) or run-esx.sql (ESX Legacy) file in your database software (such as PhpMyAdmin or HeidiSQL).
If you get an error along the lines of cannot use the syntax IF NOT EXISTS, remove every instance of IF NOT EXISTS from the run-qb.sql/run-esx.sql file, and re-run it. It will still run fine.
Make sure you are running this SQL code in the correct database - triple check and cross reference the name of the database!
Last updated 5 October 2026