> For the complete documentation index, see [llms.txt](https://docs.t1ger.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.t1ger.net/resources/t1ger-tuning/exports/client.md).

# Client

Client-sided exports

## OpenModsMainMenu

Opens the mods menu for a vehicle. Blocks entry if the vehicle needs repair and `Repair.allow` is false. Snapshots all current mods before opening so the vehicle can be restored if the menu is closed without checkout.

```lua
exports["t1ger_tuning"]:OpenModsMainMenu(vehicle, accessType, shopId, allowedCategories, allowedMods, isFree)
```

**Parameters**

* **vehicle** *(integer)* – The vehicle entity handle.
* **accessType** *(string)* – `"customs"` or `"modstation"`.
* **shopId** *(integer, optional)* – The shop ID. Customs access only.
* **allowedCategories** *(table, optional)* – Restricts the menu to specific categories. `nil` means all categories allowed.
* **allowedMods** *(table, optional)* – Restricts the menu to specific mod types. Modstation access only; `nil` means all mods allowed.
* **isFree** *(boolean, optional)* – Whether mods are free at this access point. Modstation access only.

***

## GetModsMenuState

Returns the current in-memory state of the mods menu session (active vehicle, access type, basket alterations, etc).

```lua
exports["t1ger_tuning"]:GetModsMenuState()
```

**Returns**

* **table** – The `ModsMenu` state table.

***

## OpenEngineSwapMenu

Opens the engine swap menu for a vehicle at a tuner shop.

```lua
exports["t1ger_tuning"]:OpenEngineSwapMenu(vehicle, shopId)
```

**Parameters**

* **vehicle** *(integer)* – The vehicle entity handle.
* **shopId** *(number)* – The shop ID.

***

## OpenDynoMenu

Opens the dyno main menu — view current modifiers or fine tune torque, power and brakes.

```lua
exports["t1ger_tuning"]:OpenDynoMenu(vehicle, knownStats)
```

**Parameters**

* **vehicle** *(integer)* – The vehicle entity handle.
* **knownStats** *(table, optional)* – Pass the just-applied `{ torque, power, brakes }` values directly to avoid a stale display right after saving.

***

## GetVehicleDyno

Returns the vehicle's current dyno data from its statebag.

```lua
exports["t1ger_tuning"]:GetVehicleDyno(vehicle)
```

**Parameters**

* **vehicle** *(integer)* – The vehicle entity handle.

**Returns**

* **table|nil** – `{ torque, power, brakes }`, or `nil` if the vehicle has never been dyno tuned.

***

## SetVehicleDyno

Sets the vehicle's dyno data. Server-authoritative — values are clamped server-side to the configured slider ranges regardless of what's sent here.

```lua
exports["t1ger_tuning"]:SetVehicleDyno(vehicle, data)
```

**Parameters**

* **vehicle** *(integer)* – The vehicle entity handle.
* **data** *(table)* – `{ torque, power, brakes }`.

***

## OpenNitrousMenu

Opens the nitrous menu for a vehicle — install a fresh kit, upgrade an existing one, or manage the burst kit.

```lua
exports["t1ger_tuning"]:OpenNitrousMenu(vehicle, shopId)
```

**Parameters**

* **vehicle** *(integer)* – The vehicle entity handle.
* **shopId** *(number)* – The shop ID.

***

## GetVehicleNitrous

Returns the vehicle's current nitrous data from its statebag.

```lua
exports["t1ger_tuning"]:GetVehicleNitrous(vehicle)
```

**Parameters**

* **vehicle** *(integer)* – The vehicle entity handle.

**Returns**

* **table|nil** – `{ size, shots, burst, color }`, or `nil` if no nitrous kit is installed.

***

## SetVehicleNitrous

Merges the given fields into the vehicle's nitrous data and updates the statebag, syncing to all clients. Pass only the fields you want to change — e.g. `{ shots = 12 }` — existing fields are preserved.

```lua
exports["t1ger_tuning"]:SetVehicleNitrous(vehicle, data)
```

**Parameters**

* **vehicle** *(integer)* – The vehicle entity handle.
* **data** *(table)* – Partial or full `{ size, shots, burst, color }`.

***

## GetVehicleNitrousShots

Returns the vehicle's current nitrous shots count.

```lua
exports["t1ger_tuning"]:GetVehicleNitrousShots(vehicle)
```

**Parameters**

* **vehicle** *(integer)* – The vehicle entity handle.

**Returns**

* **number** – The current shot count. `0` if no kit is installed.

***

## SetVehicleNitrousShots

Sets the vehicle's nitrous shots count, clamped between 0 and the kit's max capacity (size × 10).

```lua
exports["t1ger_tuning"]:SetVehicleNitrousShots(vehicle, shots)
```

**Parameters**

* **vehicle** *(integer)* – The vehicle entity handle.
* **shots** *(number)* – The desired shot count.

***

## SaveVehicleNitrous

Sends the vehicle's current nitrous data to the server for persistence. Intended for use in garage scripts that delete the vehicle before the server's own removal handler can catch it.

```lua
exports["t1ger_tuning"]:SaveVehicleNitrous(vehicle)
```

**Parameters**

* **vehicle** *(integer)* – The vehicle entity handle.

***

## BillingMain

Opens the main billing menu for the local player's tuner shop.

```lua
exports["t1ger_tuning"]:BillingMain(returnMenu)
```

**Parameters**

* **returnMenu** *(string, optional)* – ox\_lib context menu ID to return to when this menu is closed.

***

## CreateShop

Opens the interface for creating a new tuner shop. Admin use.

```lua
exports["t1ger_tuning"]:CreateShop(returnMenu)
```

**Parameters**

* **returnMenu** *(string, optional)* – ox\_lib context menu ID to return to when this menu is closed.

***

## ViewShops

Displays the list of tuner shops in a menu. Admin use.

```lua
exports["t1ger_tuning"]:ViewShops(returnMenu)
```

**Parameters**

* **returnMenu** *(string, optional)* – Menu ID to return to if entered from a menu.

***

## IsPlayerEmployee

Checks if the local player is an employee of a specific shop, or any shop.

```lua
exports["t1ger_tuning"]:IsPlayerEmployee(shopId)
```

**Parameters**

* **shopId** *(number, optional)* – The shop ID to check. If omitted, checks all shops.

**Returns**

* **boolean** – `true` if the player is an employee, otherwise `false`.
* **number|nil** – The ID of the shop the player is employed at, or `nil` if not found.

***

## IsPlayerTuner

Checks if the local player's job matches any tuner shop's job.

```lua
exports["t1ger_tuning"]:IsPlayerTuner(shopId)
```

**Parameters**

* **shopId** *(number, optional)* – The shop ID to check. If omitted, checks all shops.

**Returns**

* **boolean** – `true` if the player has a matching tuner job, otherwise `false`.
* **number|nil** – The ID of the matching shop, or `nil` if not found.

***

## IsPlayerTunerBoss

Checks if the local player's job is boss-grade at a specific tuner shop, or any shop.

```lua
exports["t1ger_tuning"]:IsPlayerTunerBoss(shopId)
```

**Parameters**

* **shopId** *(number, optional)* – The shop ID to check. If omitted, checks all shops.

**Returns**

* **boolean** – `true` if the player is a boss-grade tuner, otherwise `false`.
* **number|nil** – The ID of the shop where the player is boss, or `nil` if not found.

***

## IsPlayerShopOwner

Checks if the local player is the owner of a specific shop, or any shop.

```lua
exports["t1ger_tuning"]:IsPlayerShopOwner(shopId)
```

**Parameters**

* **shopId** *(number, optional)* – The shop ID to check. If omitted, checks all shops.

**Returns**

* **boolean** – `true` if the player owns the shop, otherwise `false`.
* **number|nil** – The ID of the owned shop, or `nil` if not found.

***

## OpenModOrderMenu

Opens the mod order context menu for the tuner. Shows order details, start/stop work options and the full task list.

```lua
exports["t1ger_tuning"]:OpenModOrderMenu(vehicle, shopId, plate, order)
```

**Parameters**

* **vehicle** *(integer)* – The vehicle entity handle.
* **shopId** *(number)* – The shop ID.
* **plate** *(string)* – The vehicle's plate.
* **order** *(table)* – The mod order data.

***

## OpenNpcJobsMenu

Opens the NPC jobs menu from the tuner tablet — Salvage Car and Mobile Tuning.

```lua
exports["t1ger_tuning"]:OpenNpcJobsMenu()
```

***

## IsWorkflowActive

Returns whether the mod order workflow UI is currently active and open.

```lua
exports["t1ger_tuning"]:IsWorkflowActive()
```

**Returns**

* **boolean** – `true` if the workflow UI is open, otherwise `false`.
