mirror of
https://github.com/darksaid98/overextended.github.io.git
synced 2026-12-01 22:21:48 +00:00
formatting and typos
This commit is contained in:
1 parent
75698216e0
commit
724c7e356d
99 files changed
+515
-305
No files matched your search
@@ -6,6 +6,7 @@ Searches the inventory for an item, or list of items, with the result varying ba
|
||||
```lua
|
||||
exports.ox_inventory:Search(search, item, metadata)
|
||||
```
|
||||
|
||||
* 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
|
||||
|
||||
@@ -9,7 +9,7 @@ The following snippet can be used in crafting resources such as okokCrafting or
|
||||
```lua
|
||||
local itemNames = {}
|
||||
|
||||
for item, data in pairs(exports.ox_inventory:Items()) do
|
||||
for item, data in pairs(exports.ox_inventory:Items()) do
|
||||
itemNames[item] = data.label
|
||||
end
|
||||
```
|
||||
```
|
||||
@@ -10,8 +10,8 @@ Returns whether the player's inventory is currently running an action (i.e. usin
|
||||
local isInventoryBusy = LocalPlayer.state.invBusy
|
||||
|
||||
if isInventoryBusy then
|
||||
-- Do stuff when busy
|
||||
-- Do stuff when busy
|
||||
else
|
||||
-- Do stuff when not busy
|
||||
-- Do stuff when not busy
|
||||
end
|
||||
```
|
||||
@@ -10,7 +10,7 @@ Returns whether the player's inventory is currently open or not.
|
||||
local isInventoryOpen = LocalPlayer.state.invOpen
|
||||
|
||||
if isInventoryOpen then
|
||||
-- Do stuff when open
|
||||
-- Do stuff when open
|
||||
else
|
||||
-- Do stuff when closed
|
||||
-- Do stuff when closed
|
||||
end
|
||||
@@ -5,4 +5,5 @@ Mostly used for weaponised vehicles, though could be called for "minigames"
|
||||
```lua
|
||||
local exports.ox_inventory:weaponWheel(state)
|
||||
```
|
||||
|
||||
* state: `boolean`
|
||||
@@ -3,6 +3,7 @@ Sets a metadata property to display in the tooltip.
|
||||
```lua
|
||||
exports.ox_inventory:displayMetadata(metadata, value)
|
||||
```
|
||||
|
||||
* metadata: `table` or `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.
|
||||
@@ -10,6 +11,7 @@ exports.ox_inventory:displayMetadata(metadata, value)
|
||||
* Label for the string metadata property to be displayed.
|
||||
|
||||
**Example:**
|
||||
|
||||
```lua
|
||||
exports.ox_inventory:displayMetadata('mustard', 'Mustard')
|
||||
```
|
||||
|
||||
@@ -6,6 +6,7 @@ Opens an inventory using the passed data.
|
||||
```lua
|
||||
exports.ox_inventory:openInventory(invType, data)
|
||||
```
|
||||
|
||||
* invType: `string`
|
||||
* `'player'`
|
||||
* `'shop'`
|
||||
|
||||
@@ -3,6 +3,7 @@ Forces the secondary-inventory key to open the passed inventory. Can be useful t
|
||||
```lua
|
||||
exports.ox_inventory:setStashTarget(id, owner)
|
||||
```
|
||||
|
||||
* id: `string` or `number`
|
||||
* Stash id.
|
||||
* owner?: `string` or `number`
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
Uses the passed item, then triggers the callback function.
|
||||
Uses the passed item, then triggers the callback function.
|
||||
Should be calling during item callbacks to utilise the builtin methods (server checks, progress bar, etc.).
|
||||
|
||||
```lua
|
||||
exports.ox_inventory:useItem(data, cb)
|
||||
```
|
||||
|
||||
* data: `table`
|
||||
* cb?: `function`
|
||||
|
||||
|
||||
@@ -3,4 +3,5 @@ Uses the item in the given inventory slot.
|
||||
```lua
|
||||
exports.ox_inventory:useSlot(slot)
|
||||
```
|
||||
|
||||
* slot: `number`
|
||||
Reference in new issue
Block a user