From 555bcecb21573c591b9378c983ba25602a7c68fb Mon Sep 17 00:00:00 2001 From: Luke Date: Sat, 5 Mar 2022 21:33:57 +0100 Subject: [PATCH] Remove some admonitions --- docs/ox_inventory/Guides/index.md | 5 +-- docs/ox_inventory/Guides/inventory_ui.md | 28 ++++++++++------- docs/ox_inventory/Guides/stashes.md | 39 ++++++++++++++++++------ docs/oxmysql/Getting Started/index.md | 2 -- 4 files changed, 48 insertions(+), 26 deletions(-) diff --git a/docs/ox_inventory/Guides/index.md b/docs/ox_inventory/Guides/index.md index c87c91df..fac66b1b 100644 --- a/docs/ox_inventory/Guides/index.md +++ b/docs/ox_inventory/Guides/index.md @@ -2,9 +2,6 @@ title: Overview --- -:::info - Providing examples and explaining certain inventory API into more detail. -If you have trouble understanding how some of the API works check out our [___example resource___](https://github.com/overextended/ox_inventory_examples). -::: \ No newline at end of file +If you have trouble understanding how some of the API works check out our [___example resource___](https://github.com/overextended/ox_inventory_examples). \ No newline at end of file diff --git a/docs/ox_inventory/Guides/inventory_ui.md b/docs/ox_inventory/Guides/inventory_ui.md index ec43ee20..4f85506f 100644 --- a/docs/ox_inventory/Guides/inventory_ui.md +++ b/docs/ox_inventory/Guides/inventory_ui.md @@ -2,29 +2,35 @@ title: Building inventory UI --- -:::info Requirements to build: +import IconButton from '@site/src/components/IconButton' +import {FaNodeJs} from 'react-icons/fa' + +## Requirements to build: * Node.js * Yarn -::: -:::info Installing Node.js: -* Download the LTS version of Node.js from [___here___](https://www.nodejs.org). +## Installing Node.js: + +* Download the LTS version of Node.js. * Go through the install and make sure you install all of the features. -* Run node --version in cmd and make sure that it gives you the version number. If it doesn't then you didn't install it correctly. -::: +* Run `node --version` in cmd and make sure that it gives you the version number. If it doesn't then you didn't install it correctly. -:::info Installing Yarn: + + }>Download + + +## Installing Yarn: * Now that you've installed Node.js you can install Yarn by running `npm install --global yarn` in cmd. -::: -:::info Building the inventory UI: + +## Building the UI: * cd into the web directory of ox_inventory * In your cmd type `yarn` and in will start downloading the node modules. * After it's done downloading node modules you can run `yarn build` to build the UI. -::: -:::tip Hot reloads + +:::info Hot reloads When working in the browser you can run `yarn start`, which supports hot reloads meaning that you will see your changes after saving your file. diff --git a/docs/ox_inventory/Guides/stashes.md b/docs/ox_inventory/Guides/stashes.md index c2210e2b..e8421226 100644 --- a/docs/ox_inventory/Guides/stashes.md +++ b/docs/ox_inventory/Guides/stashes.md @@ -2,17 +2,30 @@ title: Creating custom stashes --- +import IconButton from '@site/src/components/IconButton' +import { BsGithub } from 'react-icons/bs' + We can set up custom stashes from outside the resource utilising the exported RegisterStash function. Firstly, we need to define the stashes properties. -| Argument | Type | Optional | Explanation | ----------- | -------- | -------- | ----------- | -id | string | no | A unique name to identify the stash in the database | -label | string | no | A display name when viewing the inventory | -slots | integer | no | Number of slots | -weight | integer | no | Maximum weight | -owner | str/bool | yes | See below | -job | table | yes | Key-value pairs of job name and minimum grade to access | -coords | vector | yes | A vector (or table) containing x, y, z coordinates | +```lua +-- id: string +-- label: string +-- slots: number +-- weight: number +-- owner: string or boolean (optional) +-- job: table (optional) + -- name: string + -- grade: number +-- coords: vector or table (optional) +``` + +- `id` - A unique name to identify the stash in the database +- `label` - Display name when viewing the stash +- `slots` - Number of slots that the stash will have +- `weight` - Maximum stash weight +- `owner` - See below +- `job` - Key-value pairs of job name and minimum grade to access +- `coords` - Vector or table containing coordinates The owner field will set permissions for stash access, with stashes registering to specific identifiers. - true: Each player has their own unique stash, but can request to open the stash of another player @@ -69,3 +82,11 @@ if ox_inventory:openInventory('stash', property.id) == false then ox_inventory:openInventory('stash', property.id) end ``` + +## Example resource + +We put together an example resoruce showcasing how to properly utilise the stash API: + + + }>GitHub + \ No newline at end of file diff --git a/docs/oxmysql/Getting Started/index.md b/docs/oxmysql/Getting Started/index.md index 105ac370..186d1f58 100644 --- a/docs/oxmysql/Getting Started/index.md +++ b/docs/oxmysql/Getting Started/index.md @@ -25,12 +25,10 @@ set mysql_slow_query_warning 150 set mysql_debug true ``` ### Using the UI -:::info Before using the UI first you have to make sure you have the `mysql_ui` convar set to true: ``` set mysql_ui true ``` Also make sure that you have `command` ace permission access, then you should be able to use the `mysql` command in game to open up the UI and see your query data. -:::