From 56b7b3ab0406f22f9685b58218773a15ca2dd3f6 Mon Sep 17 00:00:00 2001 From: Luke Date: Fri, 11 Mar 2022 16:48:01 +0100 Subject: [PATCH] Fix icon button links being too large --- docs/ox_inventory/Guides/inventory_ui.md | 8 +- docs/ox_inventory/Guides/stashes.md | 8 +- docs/ox_inventory/installation.mdx | 103 ++++++++++++++--------- 3 files changed, 75 insertions(+), 44 deletions(-) diff --git a/docs/ox_inventory/Guides/inventory_ui.md b/docs/ox_inventory/Guides/inventory_ui.md index 4f85506f..1215d26c 100644 --- a/docs/ox_inventory/Guides/inventory_ui.md +++ b/docs/ox_inventory/Guides/inventory_ui.md @@ -16,9 +16,11 @@ import {FaNodeJs} from 'react-icons/fa' * 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. - - }>Download - +
+ + }>Download + +
## Installing Yarn: diff --git a/docs/ox_inventory/Guides/stashes.md b/docs/ox_inventory/Guides/stashes.md index e8421226..65f3a029 100644 --- a/docs/ox_inventory/Guides/stashes.md +++ b/docs/ox_inventory/Guides/stashes.md @@ -87,6 +87,8 @@ end We put together an example resoruce showcasing how to properly utilise the stash API: - - }>GitHub - \ No newline at end of file +
+ + }>GitHub + +
\ No newline at end of file diff --git a/docs/ox_inventory/installation.mdx b/docs/ox_inventory/installation.mdx index aabe5d72..de64268d 100644 --- a/docs/ox_inventory/installation.mdx +++ b/docs/ox_inventory/installation.mdx @@ -2,12 +2,11 @@ title: Getting Started --- -import IconButton from '@site/src/components/IconButton' -import { BsGithub, BsBookHalf } from 'react-icons/bs' +import IconButton from '@site/src/components/IconButton'; +import { BsGithub, BsBookHalf } from 'react-icons/bs'; import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; - :::caution This resource is being designed with the intention of providing advanced functionality while remaining easy to use, @@ -23,13 +22,17 @@ We utilise our own resource to communicate with MySQL databases via the node-mys The backend is actively maintained and updated unlike the package used by mysql-async, providing improved performance, security, and features. We provide full backwards compatibility with mysql-async and build for the current Cfx architecture. -
- - }>GitHub - - - }>Documentation - +
+ + }> + GitHub + + + + }> + Documentation + +
### Ox Lib @@ -38,23 +41,32 @@ A resource designed to provide reusable functions that can be loaded into any re **Currently used for:** -* SetInterval -* Server Callbacks -* Table utilities (contains, matches) -* Requesting models, animations, etc. -* Disabling control actions +- SetInterval +- Server Callbacks +- Table utilities (contains, matches) +- Requesting models, animations, etc. +- Disabling control actions - - }>GitHub - +
+ + }> + GitHub + + +
### Production Build + The interface is written in TypeScript using the React library, so the code included in the repository will not work. You either need to build the package yourself (more information in [guides](./Guides) section), or download a release (ox_inventory.zip). - - }>GitHub - +
+ + }> + GitHub + + +
## Optional resources @@ -74,13 +86,17 @@ You will need to enable compatibility manually by adjusting your config - more i You must start qtarget before the inventory and after your framework. ::: -
- - }>GitHub - - - }>Documentation - +
+ + }> + GitHub + + + + }> + Documentation + +
### NPWD @@ -89,16 +105,19 @@ A standalone and feature-rich phone created by Project Error. The inventory will handle disabling the phone when the player has no item, and supports toggling the phone through item use. -
- - }>GitHub - - - }>Documentation - +
+ + }> + GitHub + + + + }> + Documentation + +
- ### Installation @@ -106,6 +125,7 @@ The inventory will handle disabling the phone when the player has no item, and s Use a compatible version of [ESX Legacy](https://github.com/esx-framework/esx-legacy) (1.6.0+) Execute the query inside [install.sql](https://github.com/overextended/ox_inventory/blob/main/setup/install.sql) and [vehicle.sql](https://github.com/overextended/ox_inventory/blob/main/setup/vehicle.sql) + @@ -115,6 +135,7 @@ and [vehicle.sql](https://github.com/overextended/ox_inventory/blob/main/setup/v Open `fxmanifest.lua` and uncomment `server_script 'setup/convert.lua'` Start the server and execute the `convertinventory` command from the console Remove the conversion file + @@ -123,6 +144,7 @@ and [vehicle.sql](https://github.com/overextended/ox_inventory/blob/main/setup/v Open `fxmanifest.lua` and uncomment `server_script 'setup/convert.lua'` Start the server and execute the `convertinventory` linden command from the console Remove the conversion file + @@ -130,6 +152,7 @@ Work in progress. Refer to the "bridge" module to get an idea of how you setup support for any framework. Modifications will need to be made for licenses, owned vehicles, and jobs. + @@ -139,6 +162,7 @@ You should restart your server after the first startup to ensure everything has ::: ## Upgrading ESX + Ox Inventory provides a complete suite of tools to replace the built-in items and inventory system from ESX, and is not intended to be used with resources designed around it. - ESX loadouts do not exist - resources that use them need to remove references or be modified to look for the weapon as an item @@ -147,6 +171,7 @@ Ox Inventory provides a complete suite of tools to replace the built-in items an - Resources like esx_inventoryhud, esx_trunkinventory, esx_addoninventory, etc. should be removed ### Optional optimisation + All item related functions from xPlayer, such as `xPlayer.getInventoryItem`, have been modified for compatibility purposes; however they are considered deprecated. The reasoning is fairly simple - there's now additional function references and overhead to consider. Fortunately, the new Inventory functions can be used directly and offer a great deal of improvements over the old ones. @@ -157,12 +182,13 @@ You should read through the functions section for further information, but the f ```lua -if xPlayer.getInventoryItem('acetone').count > 2 and xPlayer.getInventoryItem('antifreeze').count > 4 and xPlayer.getInventoryItem('sudo').count > 9 then +if xPlayer.getInventoryItem('acetone').count > 2 and xPlayer.getInventoryItem('antifreeze').count > 4 and xPlayer.getInventoryItem('sudo').count > 9 then xPlayer.removeInventoryItem("acetone", 3) xPlayer.removeInventoryItem("antifreeze", 5) xPlayer.removeInventoryItem("sudo", 10) end ``` + @@ -182,5 +208,6 @@ if items and items.acetone > 2 and items.antifreeze > 4 and items.sudo > 9 then ox_inventory:RemoveItem(source, 'sudo', 10) end ``` + - \ No newline at end of file +