Vehicles

If the exports are active and the sync is also active, the sync is preferred and the exports are deactivated.

Configure in config.sync.lua

Make sure that in Config.Sync the entry active is set to true and in Types the Users & Vehicles are set to true. (if Users is false there is no correct connection to the owner)

ConConfig.Sync is now SyncSettings.MainData

(Optional VehiclesWhere)

You can insert a custom where statement for the vehicles sync

Only the column in the Vehicles-Table can be filtered

  1. ESX “owned_vehicles”

  2. QB “player_vehicles”

Example filters:

This filter will remove all vehicles where plate is starting with LSPD or LSMD

ESX

owned_vehicles.plate not like ‘LSPD%’ AND owned_vehicles.plate not like ‘LSMD%’

QB

player_vehicles.plate not like ‘LSPD%’ AND player_vehicles.plate not like ‘LSMD%’

Add data to the sync

  1. Open the sync_functions.lua with any ide (notepad++, visual studio code)

    1. /server/sync/vehicles.lua

  2. Search in the file the FormatData function for your Framework

    1. ESX : myMDT_core_sync.vehicles.FormatData_ESX

    2. QB: myMDT_core_sync.vehicles.FormatData_QB

The Important part is now where the curly brackets from the return

if your vehicles-table stores the model of the vehicle than you simply need to add this like following:

veh_model = inputData.model added

on the left hand is the column name/key from myMDT_core, on the right side is the column from your vehicles table.

Never remove this keys : id, fromsystem, plate

if you want to remove the owner from sync please set follwing to false if available:

myMDT_core_sync.vehicles.QuestionOwnerOnPartialSync

Available Keys

owner

veh_type

mot

veh_model

others

color

Last updated