mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 22:22:46 +00:00
new docs
This commit is contained in:
1 parent
3cebaf7fa5
commit
b5eba8423f
229 files changed
+6238
-10690
No files matched your search
@@ -0,0 +1,61 @@
|
||||
import { Tabs, Tab } from 'nextra-theme-docs';
|
||||
|
||||
Opens an inventory using the passed data.
|
||||
|
||||
```lua
|
||||
exports.ox_inventory:openInventory(invType, data)
|
||||
```
|
||||
|
||||
* invType: `string`
|
||||
* `'player'`
|
||||
* `'shop'`
|
||||
* `'stash'`
|
||||
* `'crafting'`
|
||||
* `'container'`
|
||||
* `'drop'`
|
||||
* `'glovebox'`
|
||||
* `'trunk'`
|
||||
* `'dumpster'`
|
||||
* data: `number` or `string` or `table`
|
||||
|
||||
<Tabs items={['Player', 'Shop', 'Stash']}>
|
||||
<Tab>
|
||||
|
||||
**Open the target player's inventory.**
|
||||
|
||||
```lua
|
||||
exports.ox_inventory:openInventory('player', 3)
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab>
|
||||
|
||||
**Open the fourth "General Store" [location](https://github.com/overextended/ox_inventory/blob/main/data/shops.lua#L14).**
|
||||
|
||||
```lua
|
||||
exports.ox_inventory:openInventory('shop', { type = 'General', id = 4 })
|
||||
```
|
||||
|
||||
</Tab>
|
||||
<Tab>
|
||||
|
||||
**Open the first stash in [data/stashes](https://github.com/overextended/ox_inventory/blob/main/data/stashes.lua#L2-L19).**
|
||||
|
||||
```lua
|
||||
exports.ox_inventory:openInventory('stash', 1)
|
||||
```
|
||||
|
||||
**Open a custom stash (created on the server with RegisterStash).**
|
||||
|
||||
```lua
|
||||
exports.ox_inventory:openInventory('stash', 'society_police')
|
||||
```
|
||||
|
||||
**Open a stash with a specific owner.**
|
||||
|
||||
```lua
|
||||
exports.ox_inventory:openInventory('stash', { id = 'police_locker', owner = 'license:xxxxxxxx' })
|
||||
```
|
||||
|
||||
</Tab>
|
||||
</Tabs>
|
||||
Reference in new issue
Block a user