> For the complete documentation index, see [llms.txt](https://docs.redutzu.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.redutzu.com/resources/redutzu-mdt/exports-events/server-exports/vehicles.md).

# Vehicles

Here, you'll find key exports for managing vehicles. These exports allow you to register and update vehicles as needed.

***

## Type

```typescript
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

```lua
exports['redutzu-mdt']:RegisterVehicle({
  plate = 'ABC1234',
  owner = 'license:1234',
  model = 'hash/model',
  notes = 'Vehicle notes',
  image = 'https://yourwebsite.com/'
}) -- boolean
```

### SearchVehicle

```lua
exports['redutzu-mdt']:SearchVehicle(plate: string) // VehicleType | null
```

### UpdateVehicle

```lua
-- It returns a boolean (if it was successfully updated)
exports['redutzu-mdt']:UpdateVehicle(plate, {
  image = 'https://yourwebsite.com/'
}) -- boolean
```

```lua
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')
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.redutzu.com/resources/redutzu-mdt/exports-events/server-exports/vehicles.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
