Client
Client exports
AddNewModItem
Add a new mod to the OBD device
All added mods will appear in the device, the callback will be called whenever a mod value has been changed in the device, or a new car with an already applied mod has been spawned/came into players render distance
-- Example
exports.kq_obd:AddNewModItem({
name = 'Headlight brightness',
description = 'Adjusts the intensity of the vehicle’s headlight output. Note: increased brightness may not be road-legal in all areas.',
options = {
['0.25'] = '25%',
['0.5'] = '50%',
['0.75'] = '75%',
['1'] = '100%',
['1.25'] = '125%',
['1.5'] = '150%',
},
default = 1,
callback = function(vehicle, value)
SetVehicleLightMultiplier(vehicle, tonumber(value) + 0.0)
end
})
-- Returns:
-- (boolean)
AddFaultCode
Logs a new fault to a vehicle
Add a fault to a specific vehicle. Logging the same fault multiple times will simply update the "Last seen at" date on the fault
Arguments:
entity:
int
The entity ID of the vehicle to which you want to log a faultfaultData:
table
name:
string
The name of the faultdescription:
string
The description of the faultcomponent:
string
The vehicle component of which the fault is a part of (Engine, Electric, Brakes etc.)
-- Example
exports.kq_obd:AddFaultCode(entity, {
name = 'P0300 - Engine misfire',
description = 'Random/Multiple Cylinder Misfire Detected',
component = 'engine'
})
-- Returns:
-- (boolean)
Last updated