mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
cleanup file
This commit is contained in:
+27
-3
@@ -493,14 +493,38 @@ function QBCore.Functions.CanUseItem(item)
|
||||
return QBCore.UsableItems[item]
|
||||
end
|
||||
|
||||
---Use item
|
||||
---@param source any
|
||||
---@param item string
|
||||
-- Inventory Backwards Compatibility
|
||||
|
||||
function QBCore.Functions.UseItem(source, item)
|
||||
if GetResourceState('qb-inventory') == 'missing' then return end
|
||||
exports['qb-inventory']:UseItem(source, item)
|
||||
end
|
||||
|
||||
function QBCore.Functions.SaveInventory(source)
|
||||
if GetResourceState('qb-inventory') == 'missing' then return end
|
||||
exports['qb-inventory']:SaveInventory(source, false)
|
||||
end
|
||||
|
||||
function QBCore.Functions.SaveOfflineInventory(PlayerData)
|
||||
if GetResourceState('qb-inventory') == 'missing' then return end
|
||||
exports['qb-inventory']:SaveInventory(PlayerData, true)
|
||||
end
|
||||
|
||||
function QBCore.Functions.GetTotalWeight(items)
|
||||
if GetResourceState('qb-inventory') == 'missing' then return end
|
||||
return exports['qb-inventory']:GetTotalWeight(items)
|
||||
end
|
||||
|
||||
function QBCore.Functions.GetSlotsByItem(items, itemName)
|
||||
if GetResourceState('qb-inventory') == 'missing' then return end
|
||||
return exports['qb-inventory']:GetSlotsByItem(items, itemName)
|
||||
end
|
||||
|
||||
function QBCore.Functions.GetFirstSlotByItem(items, itemName)
|
||||
if GetResourceState('qb-inventory') == 'missing' then return end
|
||||
return exports['qb-inventory']:GetFirstSlotByItem(items, itemName)
|
||||
end
|
||||
|
||||
---Kick Player
|
||||
---@param source any
|
||||
---@param reason string
|
||||
|
||||
Reference in New Issue
Block a user