QB
Deleting Script
If you have qb-weapons script delete it
Exports
Search for exports["qb-inventory"]
and exports['qb-inventory']
in all scripts and replace with exports["tgiann-inventory"]
Note: Do not edit GetResourceStates
SetPlayerItems and SetPlayerClotheItems
Open "qb-core\server\player.lua" file
Find the "function self.Functions.UpdatePlayerData()" and add the following code to it
Convert QB Inventory Data to TGIANN Inventory Data
Upload sql_main.sql to your database
Start tgiann-inventory and use convertqb ( server/convert.lua ) on cmd/live console
Edit HasItem Functions
Open "qb-core\client\functions.lua" file
Find the "function QBCore.Functions.HasItem(items, amount)" and replace it with the following code
Open "qb-core\server\functions.lua" file
Find the "function QBCore.Functions.HasItem(source, items, amount)" and replace it with the following code
QB-Multicharacter
Open "qb-multichar\server\main.lua" file
A 2000-millisecond delay needs to be added to the
GiveStarterItems
function because the inventory is created shortly after the player is loaded, and since this function runs while the player is being loaded, the starter items cannot be given. To fix this, modify the function as shown below (we added a 2000-millisecond delay at the very beginning of the function).
Note: If you are using a different multichar script and it contains a similar code, make the same adjustment there as well.
Item List
Take a backup before replacing the item file with yours!
Enter the "qb-core/shared" folder
Download the following item list and put it in the qb-core/shared directory
Edit the new file as you wish
qb-shops
I edited qb-shops according to the inventory! Please check config for necessary explanations
Start the script after inventory!
qb-policejob
Open "qb-policejob\client\job.lua" file
Find the "RegisterNetEvent('qb-police:client:openArmoury', function()" event and replace it with the following
qb-ambulancejob
Open "qb-ambulancejob\client\job.lua" file
Find the "RegisterNetEvent('qb-ambulancejob:armory', function()" event and replace it with the following
qb-mechanicjob
Open "qb-mechanicjob\client\main.lua" file
Find the "exports['qb-target']:AddCircleZone(k .. '_shop', v.shop, 0.5, {" export and replace it with the following
Last updated