From 8f5d2192431417bc237816a3a79d2fa4990981bf Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Tue, 14 Feb 2023 00:40:52 +1100 Subject: [PATCH] Update CreateTemporaryStash.md --- .../Server/Inventory/CreateTemporaryStash.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/ox_inventory/Functions/Server/Inventory/CreateTemporaryStash.md b/docs/ox_inventory/Functions/Server/Inventory/CreateTemporaryStash.md index b1262e20..c9c856f5 100644 --- a/docs/ox_inventory/Functions/Server/Inventory/CreateTemporaryStash.md +++ b/docs/ox_inventory/Functions/Server/Inventory/CreateTemporaryStash.md @@ -1,3 +1,5 @@ +# CreateTemporaryStash + Creates a temporary stash which will be removed after some time. ```lua @@ -17,6 +19,25 @@ exports.ox_inventory:RegisterStash(properties) - `{['police'] = 0, ['ambulance'] = 2}` - coords?: `vector3` - 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: - 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) +```