fix(qb-core): add global CreateUsableItem alias for qs-inventory compatibility

qs-inventory apelează CreateUsableItem ca funcție globală, dar qb-core definea doar QBCore.Functions.CreateUseableItem (cu 'e'). Adăugat alias global + fix 16 stringuri sparte în items.lua care blocau parsarea.
This commit is contained in:
2026-04-02 00:08:19 +03:00
parent 096ccb6399
commit 978c9bc759
827 changed files with 3570 additions and 1015 deletions
@@ -0,0 +1,32 @@
if Config.SkinScript ~= 'esx_skin' then
return
end
function putClothes(backpack)
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin)
local clothes = {
male = { ['bags_1'] = backpack.cloth['male'].bag['item'], ['bags_2'] = backpack.cloth['male'].bag['texture'] },
female = { ['bags_1'] = backpack.cloth['female'].bag['item'], ['bags_2'] = backpack.cloth['male'].bag['texture'] },
}
if skin.sex == 0 then
TriggerEvent('skinchanger:loadClothes', skin, clothes.male)
elseif skin.sex == 1 then
TriggerEvent('skinchanger:loadClothes', skin, clothes.female)
end
end)
end
function RemoveClothes()
local cloth = {
male = { ['bags_1'] = 0 },
female = { ['bags_1'] = 0 },
}
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin)
if skin.sex == 0 then
TriggerEvent('skinchanger:loadClothes', skin, cloth.male)
elseif skin.sex == 1 then
TriggerEvent('skinchanger:loadClothes', skin, cloth.female)
end
end)
end
@@ -0,0 +1,19 @@
if Config.SkinScript ~= 'illenium-appearance' then
return
end
function putClothes(backpack)
if getSex() == 0 then
TriggerEvent('qb-clothing:client:loadOutfit', { outfitData = backpack.cloth['male'] })
else
TriggerEvent('qb-clothing:client:loadOutfit', { outfitData = backpack.cloth['female'] })
end
end
function RemoveClothes()
TriggerEvent('qb-clothing:client:loadOutfit', {
outfitData = {
['bag'] = { item = -1, texture = 0 }
}
})
end
@@ -0,0 +1,19 @@
if Config.SkinScript ~= 'qb-clothing' then
return
end
function putClothes(backpack)
if getSex() == 0 then
TriggerEvent('qb-clothing:client:loadOutfit', { outfitData = backpack.cloth['male'] })
else
TriggerEvent('qb-clothing:client:loadOutfit', { outfitData = backpack.cloth['female'] })
end
end
function RemoveClothes()
TriggerEvent('qb-clothing:client:loadOutfit', {
outfitData = {
['bag'] = { item = -1, texture = 0 }
}
})
end