mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
+18
-16
@@ -517,21 +517,23 @@ QBCore.Player.LoadInventory = function(PlayerData)
|
||||
for _, item in pairs(plyInventory) do
|
||||
if item ~= nil then
|
||||
local itemInfo = QBCore.Shared.Items[item.name:lower()]
|
||||
PlayerData.items[item.slot] = {
|
||||
name = itemInfo["name"],
|
||||
amount = item.amount,
|
||||
info = item.info ~= nil and item.info or "",
|
||||
label = itemInfo["label"],
|
||||
description = itemInfo["description"] ~= nil and itemInfo["description"] or "",
|
||||
weight = itemInfo["weight"],
|
||||
type = itemInfo["type"],
|
||||
unique = itemInfo["unique"],
|
||||
useable = itemInfo["useable"],
|
||||
image = itemInfo["image"],
|
||||
shouldClose = itemInfo["shouldClose"],
|
||||
slot = item.slot,
|
||||
combinable = itemInfo["combinable"]
|
||||
}
|
||||
if itemInfo ~= nil then
|
||||
PlayerData.items[item.slot] = {
|
||||
name = itemInfo["name"],
|
||||
amount = item.amount,
|
||||
info = item.info ~= nil and item.info or "",
|
||||
label = itemInfo["label"],
|
||||
description = itemInfo["description"] ~= nil and itemInfo["description"] or "",
|
||||
weight = itemInfo["weight"],
|
||||
type = itemInfo["type"],
|
||||
unique = itemInfo["unique"],
|
||||
useable = itemInfo["useable"],
|
||||
image = itemInfo["image"],
|
||||
shouldClose = itemInfo["shouldClose"],
|
||||
slot = item.slot,
|
||||
combinable = itemInfo["combinable"]
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -657,4 +659,4 @@ QBCore.EscapeSqli = function(str)
|
||||
return str:gsub( "['\"]", replacements ) -- or string.gsub( source, "['\"]", replacements )
|
||||
end
|
||||
|
||||
PaycheckLoop()
|
||||
PaycheckLoop()
|
||||
|
||||
Reference in New Issue
Block a user