> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jaksam-scripts.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set inventory disabled

> Completely disables or re-enables inventory opening, blocking hotkeys, keybinds, and direct export/event calls.

Completely disables or re-enables inventory opening. When disabled, all inventory interactions are blocked: hotkeys, keybinds, and direct export/event calls. If the inventory is currently open when disabling, it will be closed and the weapon will be dequipped automatically.

This is useful for cutscenes, minigames, progress bars, or any scenario where the player should not be able to open the inventory.

<CodeGroup>
  ```lua Export theme={null}
  exports['jaksam_inventory']:setInventoryDisabled(disabled)
  ```

  ```lua Example theme={null}
  -- Disable inventory during a cutscene
  exports['jaksam_inventory']:setInventoryDisabled(true)
  -- ... cutscene code ...
  exports['jaksam_inventory']:setInventoryDisabled(false)

  -- Disable inventory during a progress bar
  exports['jaksam_inventory']:setInventoryDisabled(true)
  -- ... progress bar logic ...
  exports['jaksam_inventory']:setInventoryDisabled(false)
  ```
</CodeGroup>

### Parameters

| Name       | Data Type | Description                                                                                 |
| ---------- | --------- | ------------------------------------------------------------------------------------------- |
| `disabled` | boolean   | If true, inventory opening is completely blocked. If false, inventory opening is re-enabled |

### Return value

None.

### Notes

**ox\_inventory compatibility:** If you are migrating from ox\_inventory, this export replaces the `invBusy` state bag pattern. Scripts that set `LocalPlayer.state:set('invBusy', true, true)` will continue to work automatically, jaksam\_inventory listens for `invBusy` state bag changes and maps them to the same internal flag.

```lua theme={null}
-- ox_inventory pattern (still works with jaksam_inventory)
LocalPlayer.state:set('invBusy', true, true)

-- jaksam_inventory native export (recommended)
exports['jaksam_inventory']:setInventoryDisabled(true)
```


## Related topics

- [Client](/jaksam-inventory/functions/client/index.md)
- [Set hotbar disabled](/jaksam-inventory/functions/client/set-hotbar-disabled.md)
- [Is inventory disabled](/jaksam-inventory/functions/client/is-inventory-disabled.md)
- [Set inventory max weight](/jaksam-inventory/functions/server/set-inventory-max-weight.md)
- [Set hotkeys enabled](/jaksam-inventory/functions/client/set-hotkeys-enabled.md)
