diff --git a/docs/ox_inventory/Functions/Client/Utils/notify.md b/docs/ox_inventory/Functions/Client/Utils/notify.md deleted file mode 100644 index 7b2dd858..00000000 --- a/docs/ox_inventory/Functions/Client/Utils/notify.md +++ /dev/null @@ -1,30 +0,0 @@ -Displays the notification used accross the inventory. - -The notifications are built using the [react-hot-teast](https://github.com/timolins/react-hot-toast) library. - -```lua --- data: table -exports.ox_inventory:notify(data) -``` - -Values for the `data` table: -```lua --- text: string --- type: string (optional) - -- 'success' - -- 'info' - default - -- 'error' --- position: string (optional) - -- 'top-left' - -- 'top-center' - default - -- 'top-right' - -- 'bottom-left' - -- 'bottom-center' - -- 'bottom-right --- duration: number (optional - default is 4000 ms) -``` - -**Example:** -```lua -exports.ox_inventory:notify({type = 'Success', text = 'Making pancakes', duration = 2500}) -``` \ No newline at end of file diff --git a/docs/ox_inventory/Functions/Client/openInventory.md b/docs/ox_inventory/Functions/Client/openInventory.md index 006df0c2..9d28464e 100644 --- a/docs/ox_inventory/Functions/Client/openInventory.md +++ b/docs/ox_inventory/Functions/Client/openInventory.md @@ -1,11 +1,56 @@ +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + Opens an inventory using on the passed data. ```lua --- inv: string --- data: any +-- invType: string +-- data: number | table 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 }) -``` \ No newline at end of file +``` + + + + +**Open the target player's inventory.** + +```lua +exports.ox_inventory:openInventory('player', 3) +``` + + + + +**Open the fourth "General Store" [location](https://github.com/overextended/ox_inventory/blob/main/data/shops.lua#L14).** + +```lua +exports.ox_inventory:openInventory('shop', { type = 'General', id = 4 }) +``` + + + + +**Open the first stash in [data/stashes](https://github.com/overextended/ox_inventory/blob/main/data/stashes.lua#L2-L19).** + +```lua +exports.ox_inventory:openInventory('stash', 1) +``` + +**Open a custom stash (created on the server with RegisterStash).** + +```lua +exports.ox_inventory:openInventory('stash', 'society_police') +``` + +**Open a stash with a specific owner.** + +```lua +exports.ox_inventory:openInventory('stash', { id = 'police_locker', owner = 'license:xxxxxxxx' }) +``` + + +