After the creating the item, restart the server. If doesn't want to restart everytime locate config.lua and find Config.Debug = false, make it true. You can restart inventory everytime.
Config.Debug, can causes bunch errors! Do not true in running server.
Item Convert! (QB-ESX)
If you have customized values, locate resources/server/items-convert.lua, and customize to your server.
Start your server, enter the "convertitems" to your server console. It will create config_converted.lua named file, you can transfer all items to config_items.lua
Inventory Keybindings
Dragging items ( Hold left click to item )
Research items ( Middle mouse button to unsearched item )
Research containers ( Middle mouse button to UNSEARCHED text or left click to Search )
Hotbar/Fastuse ( Click 3-9 keys in keyboard 1-2 for first and second weapon never be manually changed! )
Context Menu/Attachment Menu ( Right click to item )
Item Split ( Start dragging a item and hold shift, finally drop the grid, Split thing will be appear on screen. )
Inventory can be opened using F2, if you join the server for one time, F2 saved FiveM keybindings inside of GTA 5! If you change the F2, before joined users keep used F2 key!
Custom Images Per Item
Locate html > classes.js inside inventory folder, Find "GetItemImage" and customize with your own.
Custom Container Looking Weird
Make sure you created item
Find html/clothing.css
Custom Clothing/Container Creation
This example given for Clothing, same process can applicable for containers!
Created custom clothing in lua, but there is 1 process left. UI can looks weird for reason, find html/clothing.css
After doing that, custom clothing can be useable. If you want to implement the esx_skin or qb-clothing,
We already created a bag if not make one,
For an example, We're gonna edit the backpack 85
For QBCore
All Clothing Slots
top, Defined for player torso.
shirts, Defined for player t-shirt.
pants, Defined for player pants.
backpack, Defined for player bag/backpack
shoes, Defined for player shoes
mask Defined for player mask
rig Defined for player armor/bulletproof
gloves Defined for player gloves/arms
hat Defined for player hat/helmet
ear Defined for player ears
watch Defined for player watches
glasses Defined for player glasses
bracelet Defined for player bracelets
Inventory Shop Creation
What this mean this variables!
SHOP-XXXXXX
Doesnt important thing you can rename noting will be change
( ! IMPORTANT ! DO NOT DELETE SHOP- )
Shop1
Is Inventory name in config_items.lua you can customize inventory from location.
Its not important and big thing!
Temporary
Is equals temporary, make "true"!
ShopItems
ShopItems is shop items you can edit freely.
You can add or you can remove items, items created with info
(DO NOT MORE INFO ITEMS AMOUNT MORE THAN 1 LIKE WEAPONS)
if givinItem == "backpack" then -- Slot name located in config.lua
if (itemData == 40 or itemData == 41 or itemData == 44 or itemData == 45 or itemData == 81 or itemData == 82 or itemData == 86) then
givinItem = "bag1"
elseif (itemData == 85) -- Clothing id, coming from GTA V (Same with esx_skin clothing number)
givinItem = "myawesomebag"
end
if givinItem == "backpack" then -- Slot name located in config.lua
if (itemData.item == 40 or itemData.item == 41 or itemData.item == 44 or itemData.item == 45 or itemData.item == 81 or itemData.item == 82 or itemData.item == 86) then
givinItem = "bag1"
elseif (itemData == 85) -- Clothing id, coming from GTA V (Same with qb-clothing clothing number)
givinItem = "myawesomebag"
end
RegisterNetEvent('inventory:server:OpenInventory', function(name, id, other)
if name == "shop" then
local newShop = {}
for _,v in pairs(other.items) do
newShop[v.name] = v
end
if Config.Items[name] == nil then name = "shop1" end
TriggerClientEvent("inventory:client:OpenShop", source, name, id, newShop)
else
if Config.Items[name] == nil then name = "custom_inventory" end
TriggerClientEvent("inventory:client:OpenInventory", source, name, id, false)
end
end)
local function openShop(shop, data)
local products = data.products
local ShopItems = {}
ShopItems.items = {}
QBCore.Functions.TriggerCallback("qb-shops:server:getLicenseStatus", function(hasLicense, hasLicenseItem)
ShopItems.label = data["label"]
if data.type == "weapon" then
if hasLicense and hasLicenseItem then
ShopItems.items = SetupItems(shop)
QBCore.Functions.Notify(Lang:t("success.dealer_verify"), "success")
Wait(500)
else
for i = 1, #products do
if not products[i].requiredJob then
if not products[i].requiresLicense then
ShopItems.items[#ShopItems.items + 1] = products[i]
end
else
for i2 = 1, #products[i].requiredJob do
if QBCore.Functions.GetPlayerData().job.name == products[i].requiredJob[i2] and not products[i].requiresLicense then
ShopItems.items[#ShopItems.items + 1] = products[i]
end
end
end
end
QBCore.Functions.Notify(Lang:t("error.dealer_decline"), "error")
Wait(500)
QBCore.Functions.Notify(Lang:t("error.talk_cop"), "error")
Wait(1000)
end
else
ShopItems.items = SetupItems(shop)
end
for k in pairs(ShopItems.items) do
ShopItems.items[k].slot = k
end
ShopItems.slots = 30
local newShop = {}
for k,v in pairs(ShopItems.items) do
newShop[v.name] = v
end
exports["ls-inventoryhud"]:ShopInventory("SHOP-"..shop, "shop1", true, newShop)
end)
end