ox_inventory: Getting Started setup guide

This commit is contained in:
Linden committed 2022-08-24 09:55:20 +10:00
1 parent 037c52597c
commit 41f9e75629
4 files changed
+69 -90

No files matched your search

+46 -5
View File
@@ -1,11 +1,52 @@
# 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.
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
- ESX loadouts do not exist - resources that use them need to remove references or be modified to look for the weapon as an item
- Stashes from resources such as esx_policejob, esx_ambulancejob, etc. should be removed
- Shops from esx_shops or the armoury from esx_policejob should be removed
- Resources like esx_inventoryhud, esx_trunkinventory, esx_addoninventory, etc. should be removed
## Compatibility
Ox Inventory is a complete replacement for existing item, inventory, and weapon systems; it is inherently incompatible with ESX and any resources that rely on default behaviour.
- Loadouts do not exist and weapons are treated as items.
- Standard shops and stashes (i.e. esx_shops, esx_weaponshop, and esx_policejob).
- Resources that alter the default esx inventory or provide a ui (i.e. esx_trunkinventory, esx_inventoryhud).
## Installation
- Use a compatible version of [ESX Legacy](https://github.com/esx-framework/esx-legacy) (1.6.0+).
- Modify your `server.cfg`, starting ox_inventory immediately after es_extended.
```yaml
start oxmysql
start ox_lib
start es_extended
start qtarget
start ox_inventory
```
<Tabs>
<TabItem value="fresh" label="Clean install" default>
- Execute the query inside [install.sql](https://github.com/overextended/ox_inventory/blob/main/setup/install.sql) to create the ox_inventory database table.
</TabItem>
<TabItem value="convert_esx" label="Convert ESX">
- Execute the query inside [install.sql](https://github.com/overextended/ox_inventory/blob/main/setup/install.sql) to create the ox_inventory database table.
- Open `fxmanifest.lua` and uncomment `server_script 'setup/convert.lua'`.
- Start the server and type `convertinventory linden` into the server console.
- Disable `setup/convert.lua` and restart the server.
</TabItem>
<TabItem value="convert_linden" label="Upgrade from Linden Inventory">
- Execute the query inside [upgrade.sql](https://github.com/overextended/ox_inventory/blob/main/setup/upgrade.sql).
- Open `fxmanifest.lua` and uncomment `server_script 'setup/convert.lua'`.
- Start the server and type `convertinventory linden` into the server console.
- Disable `setup/convert.lua` and restart the server.
</TabItem>
</Tabs>
## Optional optimisation
+2 -85
View File
@@ -55,7 +55,7 @@ Provides easily reusable functions that can be imported into your resource or ca
GitHub
</IconButton>
</a>
<a href="../library">
<a href="../ox_lib">
<IconButton side="left" icon={<BsBookHalf />}>
Documentation
</IconButton>
@@ -129,96 +129,13 @@ You can compile it youself by following the [build guide](./Guides/inventory_ui)
### Setup
<Tabs>
<TabItem value="fresh_esx" label="Fresh ESX" default>
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)
Start order should look like the following:
```
start oxmysql
start es_extended
start ox_lib
start ox_inventory
...
```
</TabItem>
<TabItem value="convert_esx" label="Convert ESX">
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)
Open `fxmanifest.lua` and uncomment `server_script 'setup/convert.lua'`
Start the server and execute the `convertinventory esx` command from the console
Remove the conversion file
Start order should look like the following:
```
start oxmysql
start es_extended
start ox_lib
start ox_inventory
...
```
</TabItem>
<TabItem value="fresh_qb" label="Fresh QBCore" default>
Use the latest source code of [qb-core](https://github.com/qbcore-framework/qb-core)
To disable the weapon animation of qb-smallresources, use the latest source code of [qb-smallresources](https://github.com/qbcore-framework/qb-smallresources) (it will only disable if qb-inventory is **not** present inside the resources folder)
Execute the query inside [install.sql](https://github.com/overextended/ox_inventory/blob/main/setup/install.sql)
Start order should look like the following:
```
start oxmysql
start qb-core
start ox_lib
start ox_inventory
...
```
</TabItem>
<TabItem value="convert_qb" label="Convert QBCore">
Use the latest source code of [qb-core](https://github.com/qbcore-framework/qb-core)
Execute the query inside [install.sql](https://github.com/overextended/ox_inventory/blob/main/setup/install.sql)
Open `fxmanifest.lua` and uncomment `server_script 'setup/convert.lua'`
Start the server and execute the `convertinventory qb` command from the console
Remove the conversion file
Start order should look like the following:
```
start oxmysql
start qb-core
start ox_lib
start ox_inventory
...
```
</TabItem>
<TabItem value="convert_linden" label="Upgrade from Linden Inventory">
Execute the query inside [upgrade.sql](https://github.com/overextended/ox_inventory/blob/main/setup/upgrade.sql)
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
</TabItem>
<TabItem value="standalone" label="Standalone">
If you are using a supported framework, refer to the dedicated guide in the navigation bar.
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.
</TabItem>
</Tabs>
:::caution
You should restart your server after the first startup to ensure everything has been correctly setup
@@ -1,3 +1,7 @@
---
sidebar_position: 1
---
# Common Issues
## UI has not been built
+17
View File
@@ -1,11 +1,28 @@
# QBCore
## Compatibility
Ox Inventory provides a complete suite of tools to replace the built-in items and inventory system from QBCore, and is not intended to be used with resources designed around it.
- Stashes from resources such as qb-policejob, qb-ambulancejob, etc. should be removed, they are not compatible
- qb-inventory should be removed for optimal compatibility, if you didn't remove it, qb-core will not function properly and will show errors.
- qb-shops and qb-weapons automatically get stopped by Ox Inventory, so you don't have to worry about those, just don't start them manually after as they will conflict.
## Installation
- Use the latest source code of [qb-core](https://github.com/qbcore-framework/qb-core).
- Modify your `server.cfg`, starting ox_inventory immediately after qb-core.
- Execute the query inside [install.sql](https://github.com/overextended/ox_inventory/blob/main/setup/install.sql) to create the ox_inventory database table.
- To disable the weapon animation of qb-smallresources, use the latest source code of [qb-smallresources](https://github.com/qbcore-framework/qb-smallresources) (it will only disable if qb-inventory is **not** present inside the resources folder)
### Convert QBCore
If you have existing player data, you will need to convert it to a compatible format.
- Open `fxmanifest.lua` and uncomment `server_script 'setup/convert.lua'`
- Start the server and type `convertinventory qb` into the server console.
- Disable `setup/convert.lua` and restart the server.
## Optional optimisation
All item related functions from Player, such as `xPlayer.Functions.GetItemByName`, have been modified for compatibility purposes; however they are considered deprecated.