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
+47 -25

No files matched your search

-3
View File
@@ -2,9 +2,6 @@
title: Overview title: Overview
--- ---
:::info
Providing examples and explaining certain inventory API into more detail. 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 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 * Node.js
* Yarn * 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. * 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. * 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 * cd into the web directory of ox_inventory
* In your cmd type `yarn` and in will start downloading the node modules. * 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. * 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 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. you will see your changes after saving your file.
+30 -9
View File
@@ -2,17 +2,30 @@
title: Creating custom stashes 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. 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 | ```lua
---------- | -------- | -------- | ----------- | -- id: string
id | string | no | A unique name to identify the stash in the database | -- label: string
label | string | no | A display name when viewing the inventory | -- slots: number
slots | integer | no | Number of slots | -- weight: number
weight | integer | no | Maximum weight | -- owner: string or boolean (optional)
owner | str/bool | yes | See below | -- job: table (optional)
job | table | yes | Key-value pairs of job name and minimum grade to access | -- name: string
coords | vector | yes | A vector (or table) containing x, y, z coordinates | -- 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. 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 - 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) ox_inventory:openInventory('stash', property.id)
end 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 set mysql_debug true
``` ```
### Using the UI ### Using the UI
:::info
Before using the UI first you have to make sure you have the `mysql_ui` convar set to true: Before using the UI first you have to make sure you have the `mysql_ui` convar set to true:
``` ```
set mysql_ui true set mysql_ui true
``` ```
Also make sure that you have `command` ace permission access, then you should be able to use the 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. `mysql` command in game to open up the UI and see your query data.
:::