From 57e884462c69d8ac91bddf44d1448c98e0fcff9d Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Sat, 1 Jun 2024 16:11:20 +1000 Subject: [PATCH] clarify Items export use --- pages/ox_inventory/Functions/Client.mdx | 6 +++++- pages/ox_inventory/Functions/Server.mdx | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pages/ox_inventory/Functions/Client.mdx b/pages/ox_inventory/Functions/Client.mdx index a77a48e0a7..9670aa6837 100644 --- a/pages/ox_inventory/Functions/Client.mdx +++ b/pages/ox_inventory/Functions/Client.mdx @@ -85,10 +85,14 @@ exports.ox_inventory:closeInventory() Returns a table of all registered items. The format is as defined in [data/items.lua](https://github.com/overextended/ox_inventory/blob/main/data/items.lua). +Optionally takes the name of an item, returning only data for that item (getting all data is not recommended). + ```lua -exports.ox_inventory:Items() +exports.ox_inventory:Items(itemName) ``` +- itemName?: `string` + The following snippet can be used in crafting resources such as okokCrafting or core_crafting, rather than retrieving information from the server. ```lua diff --git a/pages/ox_inventory/Functions/Server.mdx b/pages/ox_inventory/Functions/Server.mdx index b2ed8e4926..4cade50f2f 100644 --- a/pages/ox_inventory/Functions/Server.mdx +++ b/pages/ox_inventory/Functions/Server.mdx @@ -88,10 +88,14 @@ exports.ox_inventory:UpdateVehicle(oldPlate, newPlate) Returns a table of all registered items. The format is as defined in [data/items.lua](https://github.com/overextended/ox_inventory/blob/main/data/items.lua). +Optionally takes the name of an item, returning only data for that item (getting all data is not recommended). + ```lua -exports.ox_inventory:Items() +exports.ox_inventory:Items(itemName) ``` +- itemName?: `string` + The following snippet can be used in crafting resources such as okokCrafting or core_crafting, rather than querying the database. ```lua