VehicleData

if you want to suse this please dont use the sync! Infomessage on startup if both are active

SaveVehicleData

Add this to your script where either the Vehicles are Bought or maybe the Vehicle get Insured (Server sided)

--just an example
local _source = source

local myPlate = "GHTS12"
local myOwner = "char1:1234684sdFg4451"
local myVeh_type = "Compact Car"
local myVeh_model = "Blista"
local myColor = "red"
local myMOT= "2026-12-31" --format YYYY-MM-DD, if you use myMechanicMDT unneccesary

exports["myMDT_core"]:SaveVehicleData(_source, {
    plate = myPlate,
    owner= myOwner,
    veh_type = myVeh_type,
    mot = myMOT,
    veh_model = myVeh_model,
    color = myColor,
})

you can also leave away some data, they will be filled by default-values if not given. the plate is the only mandatory data Owner is only useful if either the users-sync is active or also provided by exports, otherwise the Owner will be displayed as Unknown

VehicleChangePlate

If you want to change the plate for all systems

--just an example
local myOldPlate = "GHTS12"
local myNewPlate = "DBG 512"

exports["myMDT_core"]:VehicleChangePlate(myOldPlate, myNewPlate)

DeleteVehicleData

If you want to delete the vehicle-entries by plate for all systems

--just an example
local plate = "DBG 512"
exports["myMDT_core"]:DeleteVehicleData(plate)

Last updated