> For the complete documentation index, see [llms.txt](https://oph3zdev.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://oph3zdev.gitbook.io/docs/paid-scripts/inventory/events/server.md).

# Server

### openInventory

Opens an inventory for a player: no id = their own, a stash id opens that stash (created on the fly with the optional capacity table). Your housing or job script does its own checks, then opens the storage.

```lua
TriggerEvent("oph3z-inventory:server:openInventory", src)
TriggerEvent("oph3z-inventory:server:openInventory", src, "gang_stash", { label = "Gang Stash", slots = 30, maxWeight = 60000 })
```

### openInventoryById

Opens another player's inventory for a player - police search menus, admin tools.

```lua
TriggerEvent("oph3z-inventory:server:openInventoryById", src, targetSrc)
```

### server:openShop

Opens a shop for a player by its `config/shops.lua` id - a job menu opening the faction's shop.

```lua
TriggerEvent("oph3z-inventory:server:openShop", src, "ammunation")
```

### openStash

Opens a stash for a player by id.

```lua
TriggerEvent("oph3z-inventory:server:openStash", src, "evidence_locker")
```

### closeInventory

Force-closes a player's inventory - cutscenes, minigames, arrests.

```lua
TriggerEvent("oph3z-inventory:server:closeInventory", src)
```
