> For the complete documentation index, see [llms.txt](https://tgiann.gitbook.io/tgiann/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tgiann.gitbook.io/tgiann/scripts/tgiann-vehiclecontrol/client.md). Agents can also search and read this documentation through its [MCP server](https://tgiann.gitbook.io/tgiann/~gitbook/mcp).

# Client

## OpenMenu

Opens the vehicle control menu, exactly like the command or keybind. The player must be inside a vehicle. Depending on the player's saved menu type preference, the mouse (bone click) mode also activates together with the panel.

```lua
exports["tgiann-vehiclecontrol"]:OpenMenu()
```

***

## Action

Performs a vehicle control action directly without opening the menu. Notifications are suppressed. Ignored while the seat change progress bar is running.

```lua
exports["tgiann-vehiclecontrol"]:Action({ type = "door", index = 0 })
```

### Parameters

* **data**: `table` action data
  * **type**: `string` one of `"door"`, `"window"`, `"seat"`, `"trunk"`, `"hood"`, `"engine"`
  * **index?**: `integer` required for `door`/`window`/`seat`. For `door` and `window` it is the door index (`0` = front left, `1` = front right, `2` = rear left, `3` = rear right). For `seat` it is the seat slot (`0` = driver, `1` = front passenger, ...). Not used for `trunk`, `hood` and `engine`.

***

## IsKeyPressed

Returns whether one of the hold-type hotkeys (window/door/seat) is currently held down.

```lua
local isPressed = exports["tgiann-vehiclecontrol"]:IsKeyPressed()
```

### Returns

* `boolean` whether a hotkey is currently held
