Server
Server exports
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)
DeleteVehicleFaults
Deletes all vehicle faults
entity:
int
The entity ID of which you want to clear the faults of
-- Example
exports.kq_obd:DeleteVehicleFaults(entity)
-- Returns:
-- (boolean)
Last updated