π οΈINSTALLATION
Please follow each step carefully so no issues occur with the installation
1 Default configuration
Make sure you have oxmysql (if using mysql-async replace that with oxmysql)
Upload the SQL file to your database
Turn off your current inventory in server.cfg
ensure core_inventory at the end of your server.cfg in its own resource folder
2 Framework configuration
Make sure you dont have duplicate entries for functions to have no issues in your server
ESX 1.2/LEGACY
If you use latests versions of ESX, please set NewEsx = true
in your core inventory/config.lua
Replace existing functions by these functions in es_extended/server/classes/player.lua Note : All of these function should be placed inside the CreateExtendedPlayer function
QBCORE
Don't forget to remove qb-inventory folder (if you use it) from your resource folder before restarting your server after these changes
Add/ Replace functions by these functions in qb-core/server/player.lua Note : All of these functions should be placed inside the CreatePlayer function
If using new qb add the last function as well Note : This function should be placed inside the CreatePlayer function
Replace this function in qb-core/server/functions.lua
Replace this function in qb-core/client/functions.lua
In qb-core/shared/main.lua, in QBShared.StarterItems remove all item exepted id_card and driver_license
3 Items configuration
FOR BOTH FRAMEWORK
Add the image of your items in core_inventory/html/img folder.
All your images should have the same name as your items. For example, if you have an item called sandwich_bacon, the image name should be sandwich_bacon.png.
Only .png image are include in the FXManifest so be sure to use this extension for your images
ESX 1.2/LEGACY
if you don't have weapon as item, add in your database table items all the weapon and set in the column category weapons
Please make sure you set weapons with the s at the end
Add the attachment in the items database too. The attachment need a category (search 'component_' in core_inventory/config.lua to find all the attachments categories) and a componentHash. The component hash list can be find here
for each item in your items database table, configure the category, if you don't set category, the default apply by the SQL file is misc
the stack property come from the category apply to the item. The default one apply is misc and the stack value is 2. If you want to increase / decrease this number, open core_inventory/config.lua and search for ItemCategories section. You can create a new category and then apply this category in your item database.
You can configure the x and y value for each item, x is the number column take by the item, y the number of row. The default value is 1x1
For backpack item, you need to set the backpackModel (list can be find here) and the backpackTexture (default is 0 for each backpack model)
To add image's item, just put the image file (with .png extension) in the core_inventory/html/img folder
QBCORE
Add default items that are included in ITEMS.txt file in your qbcore/server/shared/items.lua file or use the file with default qb-core item in it. Categories for weapon items are already set and the size of the weapon too.
For all your weapons items in your items.lua file, add
['category']='weapons'
(don't forget the s at the end of weapons)
Please make sure you set weapons with the s at the end
Add category to your attachmenst in items.lua too. The attachment need a ['category'] (search 'component_' in core_inventory/config.lua to find all the attachments categories like ['category']='component_suppressor' for example) and a componentHash (like ['componentHash']='COMPONENT_AT_PI_SUPP_02'). The component hash list can be find here
for each items, configure the category, if you don't set category, the default apply by the script is misc
the stack property come from the category apply to the item. The default one apply is misc and the stack value is 2. If you want to increase / decrease this number, open core_inventory/config.lua and search for ItemCategories section. You can create a new category and then apply this category in your item.lua file with ['category']='yourCategoryName'.
You can configure the ['x'] and ['y'] value for each item, x is the number column take by the item, y the number of row. The default value apply by the script is 1x1
For backpack item, you need to set the ['backpackModel'] (list can be find here) and the ['backpackTexture '](default is 0 for each backpack model)
To add image's item, just put the image file (with .png extension) in the core_inventory/html/img folder
Last updated