# Client Exports

## Get Vehicle Plate

```lua
exports.bhd_garage:GetVehiclePlate(vehicle)
```

* **Description:** Retrieves the plate number of a given vehicle.
* **Arguments:**
  * `vehicle` *(entity ID)* – The entity ID of the vehicle.
* **Returns:** String representing the vehicle's plate number or XXNOTFOUNDXX if plate was not found.

## Lock Vehicle

```lua
exports.bhd_garage:LockVehicle()
```

* **Description:** Locks or unlocks the player's current vehicle.

## Toggle Engine

```lua
exports.bhd_garage:ToggleEngine()
```

* **Description:** Turns the vehicle’s engine on or off.

## Hotwire Vehicle

```lua
exports.bhd_garage:HotWire()
```

* **Description:** Attempts to hotwire a locked vehicle.
* **Returns:** Boolean indicating success or failure.

## Lockpick Vehicle

```lua
exports.bhd_garage:LockPick()
```

* **Description:** Tries to break into a locked vehicle using a lockpick.
* **Returns:** Boolean indicating success or failure.

## Save Vehicle

```lua
exports.bhd_garage:SaveVehicle({
    garage = GarageId,
    type = 'car',
    distance = 2.5,
    veh = GetVehiclePedIsIn(PlayerPedId(), false)
})
```

* **Description:** Saves the vehicle’s current state in the database.
* **Arguments:**
  * `garage` *(string)* – The ID of the garage where the vehicle is stored.
  * `type` *(string)* – The type of vehicle (e.g., `'car'`, `'boat'`, `'air'`).
  * `distance` *(number)* – The distance required for the player to store the vehicle.
  * `veh` *(entity)* – The vehicle entity being stored.

## Open Garage

```lua
exports.bhd_garage:OpenGarage({
    type = 'car',
    garage = "Garage name",
    spawnpos = {vec4(0.0,0.0,0.0,0.0), vec4(1.0,1.0,1.0,1.0)},
    impound = 'Impound - City',
    SetInToVeh = true,
})
```

* **Description:** Opens the garage menu for the player and allows interaction with vehicles.
* **Arguments:**
  * `type` *(string)* – The type of vehicle (e.g., `'car'`, `'boat'`, `'air'`).
  * `garage` *(string)* – The name of the garage.
  * `spawnpos` *(table)* – A table containing the spawn position (`vec4(x, y, z, heading)`).
  * `impound` *(string)* – The name of the impound lot used when retrieving impounded vehicles.
  * `SetInToVeh` *(boolean)* – If `true`, places the player into the vehicle upon retrieval.
  * `shareGarage` *(boolean)* – Allows sharing of the garage with others.

## Impound Vehicle

```lua
exports.bhd_garage:ImpoundVehicle(entity)
```

* **Description:** Sends the player's vehicle to the impound lot.
* **Arguments:**
  * `entity` *(entity)* – The vehicle entity.

## Get Mileage

```lua
exports.bhd_garage:GetMileage(plate)
```

* **Description:** Retrieves the mileage of a vehicle.
* **Arguments:**
  * `plate` *(string)* – The license plate of the vehicle.
* **Returns:** Number representing the vehicle's mileage.


---

# Agent Instructions: 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.bhdscripts.com/scripts/bhd-garage/developer-options/exports/client-exports.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.
