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

# Vehicles (Exports)

Server exports for vehicle state, boots, and ticket linkage.

### SERVER

Get the export object

```lua
local Vehicles = exports['mrc-metermaid']:Vehicles()
```

***

### Vehicles.Get

`Vehicles.Get(plate)`

Retrieve vehicle data by license plate.

**Parameters**

* `plate` (string)

**Returns**

* Vehicle table, or `nil` if not found.

```lua
local vehicle = Vehicles.Get("ABC1234")
if vehicle then
    print("Owner: " .. vehicle.owner)
    print("Ticket: " .. (vehicle.ticket or "None"))
end
```

***

### Vehicles.Create

`Vehicles.Create(plate)`

Create or retrieve a vehicle entry.

**Parameters**

* `plate` (string)

**Returns**

* Vehicle table.

```lua
local vehicle = Vehicles.Create("ABC1234")
```

***

### Vehicles.GetPosByPlate

`Vehicles.GetPosByPlate(plate)`

Get the world position of a vehicle by plate.

**Parameters**

* `plate` (string)

**Returns**

* `vector3` position, or `nil` if not found / not loaded.

```lua
local pos = Vehicles.GetPosByPlate("ABC1234")
if pos then
    print(("Vehicle at: %s, %s, %s"):format(pos.x, pos.y, pos.z))
end
```

***

### Vehicles.AddBoot

`Vehicles.AddBoot(plate, bone)`

Add a boot (wheel clamp) to a vehicle.

**Parameters**

* `plate` (string)
* `bone` (string) Example: `wheel_lf`, `wheel_rf`, `wheel_lr`, `wheel_rr`

**Returns**

* Bone name on success.
* `false` if vehicle not found.

```lua
Vehicles.AddBoot("ABC1234", "wheel_lf")
```

***

### Vehicles.RemoveBoot

`Vehicles.RemoveBoot(plate)`

Remove a boot (wheel clamp) from a vehicle.

**Parameters**

* `plate` (string)

**Returns**

* `true` on success.
* `false` if vehicle not found.

```lua
Vehicles.RemoveBoot("ABC1234")
```

***

### Vehicles.AddTicket

`Vehicles.AddTicket(plate, ticketId)`

Link a ticket to a vehicle.

**Parameters**

* `plate` (string)
* `ticketId` (string) Ticket number.

**Returns**

* Ticket ID on success.
* `false` if vehicle not found.

```lua
Vehicles.AddTicket("ABC1234", "PKT-202501-123456")
```

***

### Vehicles.RemoveTicket

`Vehicles.RemoveTicket(plate)`

Remove an associated ticket from a vehicle.

**Parameters**

* `plate` (string)

**Returns**

* `true` on success.
* `false` if vehicle not found.

```lua
Vehicles.RemoveTicket("ABC1234")
```


---

# 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 following URL with the `ask` and `goal` query parameters:

```
GET https://mrcscripts.gitbook.io/docs/scripts/metermaid/exports/server/vehicles-exports.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

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.
