Vehicles
Here, you'll find key exports for managing vehicles. These exports allow you to register and update vehicles as needed.
Type
type Vehicle = {
plate: string,
hash: string, // depends on your framework
notes?: string,
image?: string,
owner: {
identifier: string,
name: string
},
gallery: {
id: number,
value: string,
description: string
}[],
incidents: {
id: number,
createdAt: string
}[],
bolos: {
id: number,
createdAt: string
}[]
}
Exports
RegisterVehicle
exports['redutzu-mdt']:RegisterVehicle({
plate = 'ABC1234',
owner = 'license:1234',
model = 'hash/model',
notes = 'Vehicle notes',
image = 'https://yourwebsite.com/'
}) -- boolean
SearchVehicle
exports['redutzu-mdt']:SearchVehicle(plate: string) // VehicleType | null
UpdateVehicle
-- It returns a boolean (if it was successfully updated)
exports['redutzu-mdt']:UpdateVehicle(plate, {
image = 'https://yourwebsite.com/'
}) -- boolean
local success = exports['redutzu-mdt']:UpdateVehicle('ABC1234', {
image = 'https://yourwebsite.com/'
})
if not success then
print('There was an error updating the vehicle')
return
end
print('Vehicle updated')
Last updated
Was this helpful?