πExports & Events
HasInspection
Checks if a vehicle has a valid, expired, or no inspection based on its plate.
local status, expiresAt = exports['m-Inspection']:HasInspection(plate)
if status == "valid" then
print("Valid inspection, expires: " .. os.date('%Y-%m-%d %H:%M:%S', expiresAt))
elseif status == "expired" or status == "invalid" then
print("Invalid or expired inspection")
else
print("No inspection")
endGetPlayerInspections
Retrieves all inspections linked to a specific citizen ID.
local identifier = 'identifier or citizenid' -- Identifier or citizen id
local inspections = exports['m-Inspection']:GetPlayerInspections(citizenid)
for _, inspection in ipairs(inspections) do
print(('Plate: %s | Status: %s | Expire at: %s'):format(inspection.plate, inspection.status, os.date('%d/%m/%Y', inspection.expires_at)))
end
CreateInspection
Creates a new inspection for a specific plate and sets its expiration based on the number of days.
RemoveInspection
Removes the most recent inspection for a specific plate, if it exists.
UpdateInspectionStatus
Updates the status of the latest inspection for a given plate (e.g., to
expired,valid,invalid).
Last updated