> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_dealership/api/client.md).

# Client

Use these exports to open and close the dealership interfaces or control a test drive from another resource. Call them on the client.

## 🖥️ Tablet Exports

<details>

<summary>openCustomerTablet</summary>

Opens the customer tablet (finances and orders) and gives it focus.

```lua
exports.rcore_dealership:openCustomerTablet()
```

Does nothing if the tablet is already open.

</details>

<details>

<summary>closeCustomerTablet</summary>

Closes the customer tablet and releases focus.

```lua
exports.rcore_dealership:closeCustomerTablet()
```

</details>

<details>

<summary>openBusinessTablet</summary>

Requests the business management tablet for a dealership. The server validates the player's job and permissions before opening it.

```lua
---@param dealershipId string|number
exports.rcore_dealership:openBusinessTablet(dealershipId)
```

Only works for business dealerships where the player has a qualifying job and grade. This requests the tablet - it does not open it directly.

</details>

<details>

<summary>closeBusinessTablet</summary>

Closes the business tablet, clears its cached data, and notifies the server.

```lua
exports.rcore_dealership:closeBusinessTablet()
```

</details>

## 🚗 Store & Test Drive Exports

<details>

<summary>openVehicleStore</summary>

Opens the vehicle store for a dealership so the player can browse and buy.

```lua
---@param dealershipId string|number
exports.rcore_dealership:openVehicleStore(dealershipId)
```

The dealership must be loaded on the client. For business dealerships the model list is filtered against current stock. Does nothing if the player is already inside a store.

</details>

<details>

<summary>closeVehicleStore</summary>

Closes the vehicle store and unloads the previewed vehicle.

```lua
exports.rcore_dealership:closeVehicleStore()
```

Does nothing if the player is not inside a store.

</details>

<details>

<summary>forceEndTestDrive</summary>

Forcibly ends the local player's active test drive: clears the HUD, stops and shuts off the vehicle, and tears down the test-drive state.

```lua
exports.rcore_dealership:forceEndTestDrive()
```

Does nothing if no test drive is active.

</details>
