Skip to content

Commit

Permalink
clarify Items export use
Browse files Browse the repository at this point in the history
  • Loading branch information
thelindat committed Jun 1, 2024
1 parent 5afdb36 commit 57e8844
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion pages/ox_inventory/Functions/Client.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion pages/ox_inventory/Functions/Server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 57e8844

Please sign in to comment.