Qs-inventory and Framework IsPlayerDead fixes
qs item info had typo. IsPlayerDead was missing last stand for qb also removed couple debug prints
This commit is contained in:
1 parent
486dca3eb7
commit
3cb9829f4f
5 files changed
+9
-8
No files matched your search
@@ -257,7 +257,7 @@ Framework.GetIsPlayerDead = function(src)
|
||||
local player = QBCore.Functions.GetPlayer(src)
|
||||
if not player then return end
|
||||
local playerData = player.PlayerData
|
||||
return playerData.metadata.isdead or false
|
||||
return playerData.metadata.isdead or playerData.metadata.inlaststand or false
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@ Inventory.GetPlayerInventory = function(src)
|
||||
local playerItems = origen_inventory:GetInventory(src)
|
||||
local repackedTable = {}
|
||||
for _, v in pairs(playerItems.inventory) do
|
||||
print(json.encode(v, { indent = true }))
|
||||
table.insert(repackedTable, {
|
||||
name = v.name,
|
||||
count = v.count,
|
||||
|
||||
@@ -150,7 +150,6 @@ end
|
||||
---@return string
|
||||
Inventory.GetImagePath = function(item)
|
||||
item = Inventory.StripPNG(item)
|
||||
print(item)
|
||||
local file = LoadResourceFile("ox_inventory", string.format("web/images/%s.png", item))
|
||||
local imagePath = file and string.format("nui://ox_inventory/web/images/%s.png", item)
|
||||
return imagePath or "https://avatars.githubusercontent.com/u/47620135"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
if GetResourceState('qs-inventory') ~= 'started' then return end
|
||||
local quasar = exports["qs-inventory"]
|
||||
|
||||
Inventory = Inventory or {}
|
||||
|
||||
---comment
|
||||
@@ -14,8 +13,10 @@ end
|
||||
---@param item string
|
||||
---@return table
|
||||
Inventory.GetItemInfo = function(item)
|
||||
local itemData = quasar:GetItemList()
|
||||
if not itemData[item] then return {} end
|
||||
local itemsData = quasar:GetItemList()
|
||||
if not itemsData then return {} end
|
||||
local itemData = itemsData[item]
|
||||
if not itemData then return {} end
|
||||
local repackedTable = {
|
||||
name = itemData.name or "Missing Name",
|
||||
label = itemData.label or "Missing Label",
|
||||
|
||||
@@ -127,8 +127,10 @@ end
|
||||
---@param item string
|
||||
---@return table
|
||||
Inventory.GetItemInfo = function(item)
|
||||
local itemData = quasar:GetItemList()
|
||||
if not itemData[item] then return {} end
|
||||
local itemsData = quasar:GetItemList()
|
||||
if not itemsData then return {} end
|
||||
local itemData = itemsData[item]
|
||||
if not itemData then return {} end
|
||||
local repackedTable = {
|
||||
name = itemData.name or "Missing Name",
|
||||
label = itemData.label or "Missing Label",
|
||||
|
||||
Reference in new issue
Block a user