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:
@@ -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
|
||||
+19
@@ -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
|
||||
+19
@@ -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
|
||||
Reference in New Issue
Block a user