Remove some admonitions

This commit is contained in:
Luke committed 2022-03-05 21:33:57 +01:00
1 parent 50580c922f
commit 555bcecb21
4 files changed
+48 -26

No files matched your search

+1 -4
View File
@@ -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).
:::
If you have trouble understanding how some of the API works check out our [___example resource___](https://github.com/overextended/ox_inventory_examples).
+17 -11
View File
@@ -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:
<a href="https://www.nodejs.org">
<IconButton side='left' icon={<FaNodeJs/>}>Download</IconButton>
</a>
## 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.
+30 -9
View File
@@ -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:
<a href="https://www.github.com/overextended/ox_inventory_examples">
<IconButton side='left' icon={<BsGithub/>}>GitHub</IconButton>
</a>
-2
View File
@@ -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.
:::