Files
overextended.github.io/docs/ox_inventory/Functions/Client/openInventory.md
T

1.3 KiB

import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';

Opens an inventory using the passed data.

exports.ox_inventory:openInventory(invType, data)
  • invType: string
    • 'player'
    • 'shop'
    • 'stash'
    • 'crafting'
    • 'container'
    • 'drop'
    • 'glovebox'
    • 'trunk'
    • 'dumpster'
  • data: number or string or table

Open the target player's inventory.

exports.ox_inventory:openInventory('player', 3)

Open the fourth "General Store" location.

exports.ox_inventory:openInventory('shop', { type = 'General', id = 4 })

Open the first stash in data/stashes.

exports.ox_inventory:openInventory('stash', 1)

Open a custom stash (created on the server with RegisterStash).

exports.ox_inventory:openInventory('stash', 'society_police')

Open a stash with a specific owner.

exports.ox_inventory:openInventory('stash', { id = 'police_locker', owner = 'license:xxxxxxxx' })