Exports

Server Exports


vehiclePlateUpdated

You need to run this export in all scripts that updates plates, otherwise you will lose your vehicle's data.

-- plate: string
-- newPlate: string

exports["jg-mechanic"]:vehiclePlateUpdated(plate, newPlate)

doesVehicleNeedServicing

Returns if a vehicle needs servicing.

-- plate: string
-- returns: boolean
local needService = exports["jg-mechanic"]:doesVehicleNeedServicing(plate)

getVehicleServiceHistory

Returns the service history from a specific vehicle.

-- plate: string
--[[ return: table
{
    {
        id: number,
        date: number,
        identifier: string,
        plate: string,
        mechanic_label: string,
        serviced_paort: string,
        mechanic: string
        mileage_km: number,
    },
    ...
} 
]]

local history = exports["jg-mechanic"]:getVehicleServiceHistory(plate)

Last updated