mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 14:38:50 +00:00
Update CreateTemporaryStash.md
This commit is contained in:
1 parent
4ad3365470
commit
8f5d219243
1 file changed
+21
@@ -1,3 +1,5 @@
|
|||||||
|
# CreateTemporaryStash
|
||||||
|
|
||||||
Creates a temporary stash which will be removed after some time.
|
Creates a temporary stash which will be removed after some time.
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
@@ -17,6 +19,25 @@ exports.ox_inventory:RegisterStash(properties)
|
|||||||
- `{['police'] = 0, ['ambulance'] = 2}`
|
- `{['police'] = 0, ['ambulance'] = 2}`
|
||||||
- coords?: `vector3`
|
- coords?: `vector3`
|
||||||
- Stash can only be accessed while nearby.
|
- Stash can only be accessed while nearby.
|
||||||
|
- items?: `{ [number]: string, [number]: number, [number]?: table }[]`
|
||||||
|
- An array of tables, containing a sequence of itemName, count, metadata.
|
||||||
|
|
||||||
Return:
|
Return:
|
||||||
- inventoryId: `string`
|
- inventoryId: `string`
|
||||||
|
|
||||||
|
**Example**
|
||||||
|
|
||||||
|
```lua
|
||||||
|
local mystash = exports.ox_inventory:CreateTemporaryStash({
|
||||||
|
label = 'mystash',
|
||||||
|
slots = 5,
|
||||||
|
maxWeight = 5000,
|
||||||
|
items = {
|
||||||
|
{ 'WEAPON_MINISMG', 1 },
|
||||||
|
{ 'ammo-9', 69 },
|
||||||
|
{ 'water', 2, { label = 'Mineral water' } }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
TriggerClientEvent('ox_inventory:openInventory', 1, 'stash', mystash)
|
||||||
|
```
|
||||||
Reference in new issue
Block a user