From f60a847c5684f522e2ea088a20497d6cdc1a3fdd Mon Sep 17 00:00:00 2001 From: Luke Date: Sun, 6 Nov 2022 23:57:47 +0100 Subject: [PATCH] attempt to make linden less sad --- docs/ox_inventory/Functions/Server/Hooks.md | 2 +- .../Functions/Server/Inventory/AddItem.md | 4 +++- .../Functions/Server/Inventory/RemoveItem.md | 4 +++- docs/ox_inventory/Guides/shops.md | 19 +++++++++++++++---- 4 files changed, 22 insertions(+), 7 deletions(-) diff --git a/docs/ox_inventory/Functions/Server/Hooks.md b/docs/ox_inventory/Functions/Server/Hooks.md index a9188003..e33e27c5 100644 --- a/docs/ox_inventory/Functions/Server/Hooks.md +++ b/docs/ox_inventory/Functions/Server/Hooks.md @@ -22,7 +22,7 @@ By returning `false`, you can cancel the action and revert the inventory state. **Payload:** - source: `number` -- action: `move` or `stack` or `swap` or `give` +- action: `'move'` or `'stack'` or `'swap'` or `'give'` - fromInventory: `number` or `string` - toInventory:` number` or `string` - fromType: `string` diff --git a/docs/ox_inventory/Functions/Server/Inventory/AddItem.md b/docs/ox_inventory/Functions/Server/Inventory/AddItem.md index bbe945eb..f7e1d199 100644 --- a/docs/ox_inventory/Functions/Server/Inventory/AddItem.md +++ b/docs/ox_inventory/Functions/Server/Inventory/AddItem.md @@ -8,7 +8,9 @@ exports.ox_inventory:AddItem(inv, item, count, metadata, slot, cb) - inv: `table` or `string` or `number` - The inventory's unique id, or a table with the id and owner. - - playerId: `1`, inventoryId: `gloveVGH283`, `{ id = 'personallocker', owner = 'license:xxxxxx'}` + - playerId: `1` + - inventoryId: `gloveVGH283` + - `{ id = 'personallocker', owner = 'license:xxxxxx'}` - item: `string` - The name of the item to add to the target. - count: `number` diff --git a/docs/ox_inventory/Functions/Server/Inventory/RemoveItem.md b/docs/ox_inventory/Functions/Server/Inventory/RemoveItem.md index 0670b959..d2e65664 100644 --- a/docs/ox_inventory/Functions/Server/Inventory/RemoveItem.md +++ b/docs/ox_inventory/Functions/Server/Inventory/RemoveItem.md @@ -6,7 +6,9 @@ exports.ox_inventory:RemoveItem(inv, item, count, metadata, slot) - inv: `table` or `string` or `number` - The inventory's unique id, or a table with the id and owner. - - playerId: `1`, inventoryId: `gloveVGH283`, `{ id = 'personallocker', owner = 'license:xxxxxx'}` + - playerId: `1` + - inventoryId: `gloveVGH283` + - `{ id = 'personallocker', owner = 'license:xxxxxx'}` - item: `string` - The name of the item to remove from the target. - count: `number` diff --git a/docs/ox_inventory/Guides/shops.md b/docs/ox_inventory/Guides/shops.md index 68fdf21c..4cafd4d4 100644 --- a/docs/ox_inventory/Guides/shops.md +++ b/docs/ox_inventory/Guides/shops.md @@ -5,7 +5,7 @@ title: Creating shops import IconButton from '@site/src/components/IconButton' import { BsGithub } from 'react-icons/bs' -Builtin hops are defined in [data/shops.lua](https://github.com/overextended/ox_inventory/blob/main/data/shops.lua), and more can be added here to benefit from the built-in markers or zones support. +Builtin shops are defined in [data/shops.lua](https://github.com/overextended/ox_inventory/blob/main/data/shops.lua), and more can be added here to benefit from the built-in markers or zones support. ## Shop definition @@ -41,17 +41,28 @@ Builtin hops are defined in [data/shops.lua](https://github.com/overextended/ox_ } ``` -luke i hate this pls fix - - name: `string` - The label to display when the shop is open. - blip?: `table` - Creates a blip with the given settings. Leave it undefined for no blip to be created. + - id: `number` + - colour: `number` + - scale: `number` - groups?: `table` - Key-value pairs of job name and minimum grade to access the shop. - `{["police"] = 0, ["ambulance"] = 2}` - inventory: `table` - - { name: `string`, price: `number`, currency?: `string`, count?: `number`, license?: `string`, metadata?: `table`, grade?: `number` } + - name: `string` + - price: `number` + - currency?: `string` + - Item to be used as currency. + - count?: `number` + - Amount of the item in the stock. + - license?: `string` + - License required to purchase the item. + - metadata?: `table` + - grade?: `number` + - Grade required to purchase the item. - locations?: `vector3[]` - An array of coordinates to create unique instances of the shop archetype at, using markers. - targets?: `table[]`