Update examples and descriptions for ox_inventory

This commit is contained in:
Linden committed 2022-03-02 19:18:34 +11:00
1 parent 2a931c887a
commit ee76abb4db
10 files changed
+114 -125

No files matched your search

@@ -21,14 +21,8 @@ Options table values:
-- prop/propTwo: table (optional)
-- model: hash or string
-- bone: number (optional - default is 60309)
-- pos: table (optional)
-- x: number (default is 0)
-- y: number (default is 0)
-- z: numebr (default is 0)
-- rot: table (optional)
-- x: number (default is 0)
-- y: number (default is 0)
-- z: number (default is 0)
-- pos: vector3 (optional)
-- rot: vector3 (optional)
-- disable: table (optional)
-- move: boolean (optional)
-- car: boolean (optional)
@@ -48,10 +42,7 @@ exports.ox_inventory:Progress({
useWhileDead = false,
canCancel = true,
disable = {
move = false,
car = true,
combat = true,
mouse = false
car = true
},
anim = {
dict = 'mp_player_intdrink',
@@ -60,8 +51,8 @@ exports.ox_inventory:Progress({
},
prop = {
model = 'prop_ld_flow_bottle',
pos = { x = 0.03, y = 0.03, y = 0.02},
rot = { x = 0.0, y = 0.0, y = -1.5},
pos = vector3(0.03, 0.03, 0.02),
rot = vector3(0.0, 0.0, -1.5),
bone = 58866
},
}, function(cancel)
@@ -1,13 +1,13 @@
Searches the inventory for a specified item.
```lua
-- search: string or number ('slots' | 1, 'count' | 2)
-- search: string
-- item: table or string
-- metadata: table or string (optional)
expors.ox_inventory:Search(search, item, metadata)
```
If the `search` argument is defined as `'slots'` or `1` the return will be a table
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'` or `2` the return value
Otherwise if the `search` argument is defined as `'count'` the return value
will be the amount of the specified item in player's inventory.
@@ -1,7 +0,0 @@
Returns a table of all registered items.
Works exactly the same as [Items](./ItemsExport.md)
```lua
exports.ox_inventory:ItemList()
```
@@ -1,7 +1,11 @@
Opens the passed inventory with passed data.
Opens an inventory using on the passed data.
```lua
-- inv: string
-- data: table (optional)
exports.ox_inventory:openInventory(inv, data)
-- data: any
exports.ox_inventory:openInventory(invType, data)
exports.ox_inventory:openInventory('player', 1)
exports.ox_inventory:openInventory('stash', 1)
exports.ox_inventory:openInventory('shop', { type = 'PoliceArmoury', id = 1 })
```
@@ -1,11 +1,9 @@
---
title: setStashTarget
---
Sets the stash target to open.
Forces the secondary-inventory key to open the passed inventory. Can be useful to enable inventory access while standing inside a marker.
```lua
-- id: string or number
-- owner: string
exports.ox_inventory:setStashTaget(id, owner)
-- owner: string or number (optional)
exports.ox_inventory:setStashTarget(id, owner)
exports.ox_inventory:setStashTarget('motel5', 'bobsmith')
```
+1 -1
View File
@@ -1,4 +1,4 @@
Uses the item passed as an argument.
Uses the passed item, then triggers the callback function.
```lua
-- data: table
+1 -1
View File
@@ -1,4 +1,4 @@
Uses the item on the slot passed in as an argument.
Uses the item in the given inventory slot.
```lua
-- slot: number