mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-02 06:28:54 +00:00
inventory client new properties style update
This commit is contained in:
1 parent
5d2f3e22ff
commit
c013d3ff0c
7 files changed
+40
-32
No files matched your search
@@ -4,17 +4,16 @@ import TabItem from '@theme/TabItem';
|
||||
Searches the inventory for an item, or list of items, with the result varying based on the first argument.
|
||||
|
||||
```lua
|
||||
-- search: string
|
||||
-- item: table or string
|
||||
-- metadata: table or string (optional)
|
||||
exports.ox_inventory:Search(search, item, metadata)
|
||||
```
|
||||
|
||||
If the `search` argument is defined as `'slots'` the return will be a table
|
||||
of slots where the item was found at.
|
||||
|
||||
Otherwise if the `search` argument is defined as `'count'` the return value
|
||||
will be the amount of the specified item in player's inventory.
|
||||
* search: `'slots'` or `'count'`
|
||||
* `'slots'` returns a table of slots where the item was found at.
|
||||
* `'count'` returns the count of the specified item in player's inventory. If searching for multiple items
|
||||
returns key-value pairs of itemName = count.
|
||||
* item: `table` or `string`
|
||||
* Can be a single item name or array of item names.
|
||||
* metadata?: `table` or `string`
|
||||
* If metadata is provided as a string it will search the item's `metadata.type` property.
|
||||
|
||||
### Count
|
||||
|
||||
|
||||
Reference in new issue
Block a user