- Documentation
- 06Game
Owned vehiclesGame
Characters’ vehicles arrive in SuperMDT’s vehicle file: supported scripts, third-party garages, what isn’t read.
With Owned vehicles, characters’ vehicles arrive in the Vehicles module: plate, model, colour, owner. A plate check shows right away who owns the car, with no typing.
Turn it on
Section titled “Turn it on”- Check that your server is in the compatibility table.
- In Settings › Game › Integrations, turn on Owned vehicles.
- Under the switch, SuperMDT shows the script used and whether there’s a periodic resync.
Reserved for organization administrators and ranks with Delegated administration › Set up
the game. Server side:
Config.Integrations.vehicles.enabled in config.lua.
What arrives in SuperMDT
Section titled “What arrives in SuperMDT”- One record per plate, with the Game badge.
- The plate, model and owner follow the game, read-only in the MDT: a transfer in game changes the owner.
- The colour is the main colour mapped to a readable family (“Red”, “Grey”…). It never overwrites a colour already entered.
- The status (stolen, impounded…), photo, notes and custom fields stay the MDT’s: the game never touches them.
- At most 50 vehicles per character.
- An archived record is never recreated, and a record detached from the game is no longer updated.
- A vehicle a character no longer has (sold to an NPC, deleted) is never removed: its record keeps the last known owner, until the plate is read on another character or an officer edits it.
- Every creation or update is written to the audit log (“imported from the game the vehicle”).
When vehicles arrive
Section titled “When vehicles arrive”- on every join, reconnection or character switch, on every framework (ESX included), unless the character was read less than a minute ago;
- on purchase, gift or transfer, with qbx_vehicles (real time);
- when a vehicle is created by the base scripts: the character is read again about 3 s
later (the time for the script to write it to the database):
- QBCore: qb-vehicleshop dealership purchase (
qb-vehicleshop:server:onVehiclePurchased), qb-adminmenu/admincar(qb-admin:server:SaveCar), qb-vehiclesales second-hand lot (buy, take back, list, sell back); - Qbox: qbx_vehicleshop and qbx_adminmenu
/admincar(through qbx_vehicles), qbx_vehiclesales second-hand lot; - ESX: esx_vehicleshop (bought by the player, sold by a dealer), esx_policejob and
esx_ambulancejob service vehicles, esx_boat boats. esx_adminmenu
/admincaris a command with no event: the vehicle arrives on reconnection or withsupermdt resync;
- QBCore: qb-vehicleshop dealership purchase (
- with
supermdt resync(server console): every connected character is read and sent again right away; - at the resync of connected characters, every 30 minutes by default: it catches other scripts that write straight to the database.
An unchanged list isn’t sent again. A vehicle with no known color arrives without a color.
What isn’t read
Section titled “What isn’t read”The garage-side state of the vehicle is never read: stored, out, in the garage’s impound, under financing. The MDT status (stolen, impounded…) is the one your officers enter.
Compatibility
Section titled “Compatibility”Tested in game tried in game on a real server. Verified in code written from the script’s source code or native API, covered by the bridge’s tests, not tried in game yet. Experimental from the publisher’s public documentation, never tried: check it on your server before relying on it. Compatible the script keeps the framework’s native tables: native reading works as is.
| Framework | Script | Status | What is read |
|---|---|---|---|
| Qbox | qbx_vehicles | Verified in code | GetPlayerVehicles export, and real time on purchase, gift and transfer. |
| QBCore (and Qbox without qbx_vehicles) | player_vehicles table, through oxmysql |
Tested in game | Plate, model, properties; labels from QBCore.Shared.Vehicles. On join and at resync. |
| ESX | owned_vehicles table, through oxmysql |
Tested in game | Plate, properties. Model label from esx_vehicleshop’s vehicles table; otherwise asked to a connected player’s game; otherwise “Model” followed by the code. |
| All | jg-advancedgarages, okokGarage, cd_garage | Compatible | These garages keep the native tables and rename none of the columns read. |
| All | A garage that stores vehicles in its own table | Not supported | Nothing is read. |
| All | Neither qbx_vehicles nor oxmysql | Not supported | Nothing (warning in Settings › Game). |
Reading through oxmysql is read-only: one bounded query per character, never a write.
You can turn it off with Config.Integrations.vehicles.sql = false.
Is your script custom?
Section titled “Is your script custom?”| Your dealership or garage… | Result |
|---|---|
writes to player_vehicles (QBCore, Qbox) or owned_vehicles (ESX), original columns |
Read on join and at resync. |
| is qb-vehicleshop or esx_vehicleshop | Read a few seconds after the purchase. |
| goes through qbx_vehicles (Qbox, including qbx_vehicleshop) | Read in real time. |
| stores vehicles in another table, or renames the owner, plate or vehicle columns | Not read. |
Bridge settings
Section titled “Bridge settings”In config.lua, Config.Integrations.vehicles:
| Setting | Role | Default |
|---|---|---|
enabled |
The integration on the game server side (false: off, whatever SuperMDT says) | on |
maxPerCharacter |
Vehicles read per character (50 at most) | 50 |
resyncMinutes |
Resync of connected characters (0: never) | 30 |
sql |
Reading the native tables through oxmysql | on |
readIntervalMs |
One character read at most every… | 2,000 ms |
Troubleshooting
Section titled “Troubleshooting”A bought vehicle only shows after a while: your script has no real time (oxmysql, or
purchase inserted straight into the database); it arrives at the resync. Type
supermdt resync in the server console, lower resyncMinutes, or reconnect the character. supermdt status (“Vehicles” line) says what
is used, whether there is a resync, and counts reads and vehicles sent.
For the vehicle record itself, see Vehicles and weapons.