From 679d585bc9aba59b3668ac05b74f7450f2bb83af Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Fri, 28 Jul 2023 21:41:29 +1000 Subject: [PATCH] Update Client.mdx --- pages/ox_inventory/Functions/Client.mdx | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/pages/ox_inventory/Functions/Client.mdx b/pages/ox_inventory/Functions/Client.mdx index 93d61276..728bc90c 100644 --- a/pages/ox_inventory/Functions/Client.mdx +++ b/pages/ox_inventory/Functions/Client.mdx @@ -200,9 +200,10 @@ Sets a metadata property to display in the tooltip. exports.ox_inventory:displayMetadata(metadata, value) ``` -- metadata: `table` or `string` +- metadata: `string` or `table` or `{ [string], [string] }` - If metadata is a string then it's the metadata property you want to display, value is **not** optional then. - Can be a table of key-value pairs, key being the metadata property and value being the label for that property. + - Can be an array of string arrays, i.e. `{ {'key', 'label' }, {'key2', 'label2' }` to set the display order. - value?: `string` - Label for the string metadata property to be displayed. @@ -219,6 +220,20 @@ exports.ox_inventory:displayMetadata({ }) ``` +## giveItemToTarget + +Gives an item from the player's inventory to another player. + +```lua +exports.ox_inventory:giveItemToTarget(serverId, slotId, count) +``` + +- serverId: `number` + - The serverId of the target player. +- slotId: `number` + - The slotId of the item to give. +- count?: `number` + - The amount of the item to give, with `nil`, `0` or a value above the slot count giving the entire stack away. ## weaponWheel Enables the weapon wheel, but disables the use of inventory items.