# Exports & Events

### Open Inventory Exports

#### Clientside Export: **`openInventory`**

**Description:**\
Opens the inventory of the player.

#### Clientside Export: **`openTrunk`**

**Description:**\
Opens the trunk or glovebox of the nearest car.

### Vehicle Inventory Functions

#### Export: `vehicleInventoryAddItem`

**Description:**\
Adds an item to a vehicle's trunk or glovebox.

**Parameters:**

* `plate` (`string`): The plate of the vehicle.
* `type` (`string`): Either `"trunk"` or `"glovebox"`.
* `itemname` (`string`): The name of the item to add.
* `count` (`number`): The amount of the item to add.

***

#### Export: `vehicleInventoryRemoveItem`

**Description:**\
Removes an item from a vehicle's trunk or glovebox.

**Parameters:**

* `plate` (`string`): The plate of the vehicle.
* `type` (`string`): Either `"trunk"` or `"glovebox"`.
* `itemname` (`string`): The name of the item to remove.
* `count` (`number`): The amount of the item to remove.

***

### Job Storage Functions

#### Export: `jobInventoryAddItem`

**Description:**\
Adds an item to a job-specific storage.

**Parameters:**

* `jobname` (`string`): The name of the job which owns the inventory.
* `itemname` (`string`): The name of the item to add.
* `count` (`number`): The amount of the item to add.

***

#### Export: `jobInventoryRemoveItem`

**Description:**\
Removes an item from a job-specific storage.

**Parameters:**

* `jobname` (`string`): The name of the job which owns the inventory.
* `itemname` (`string`): The name of the item to remove.
* `count` (`number`): The amount of the item to remove.

***

### External Storage (Stash) Functions

#### Export: `externalInventoryOpen`&#x20;

**Event:** `hc_inventory:openExternalStash`&#x20;

**Description:**\
Opens an external stash inventory, intended for systems outside of player or vehicle inventories.

**Parameters:**

* `source` (`player`): Player ID to open the inventory for.
* `uniqueid` (`string`): A unique identifier for this stash.
* `data` (`table`): Configuration table with:
  * `title` (`string`): Title of the inventory.
  * `maxweight` (`number`): Maximum allowed weight.
  * `slots` (`number`): Maximum number of slots.

***

#### Export: `externalInventoryAddItem`

**Description:**\
Adds an item to an external stash.

**Parameters:**

* `uniqueid` (`string`): A unique identifier for the stash.
* `itemname` (`string`): The name of the item to add.
* `count` (`number`): The amount of the item to add.

***

#### Export: `externalInventoryRemoveItem`

**Description:**\
Removes an item from an external stash.

**Parameters:**

* `uniqueid` (`string`): A unique identifier for the stash.
* `itemname` (`string`): The name of the item to remove.
* `count` (`number`): The amount of the item to remove.

***

### Frisk / search players

#### Clientside Export: **`friskPlayer`**

**Description:**\
Opens the inventory of another player as second inventory. \
Allows the player to take items from the other player.

**Parameters:**

* `source`(`player`): Local Player ID to open the inventory for.

***


---

# 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.hyper-code.eu/documentation/inventory/exports-and-events.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.
