Small fix for client entities and qb stashes and shops
Shops: aligned format with others and removed the instant open (on create) Stashes: Updated for new version of qb (exports) Entities: returning point object
This commit is contained in:
1 parent
7d83c7579b
commit
b9f5a3ed64
2 files changed
+8
-4
No files matched your search
@@ -90,6 +90,10 @@ Inventory.OpenStash = function(src, id)
|
||||
local stash = Inventory.Stashes[id]
|
||||
assert(stash, "Stash not found", id)
|
||||
|
||||
if getInventoryNewVersion() then
|
||||
return exports['qb-inventory']:OpenInventory(src, id)
|
||||
end
|
||||
|
||||
TriggerClientEvent('community_bridge:client:qb-inventory:openStash', src, id, { weight = stash.weight, slots = stash.slots})
|
||||
end
|
||||
|
||||
@@ -192,8 +196,8 @@ end
|
||||
-- @param shopInventory table
|
||||
-- @param shopCoords table
|
||||
-- @param shopGroups table
|
||||
Inventory.CreateShop = function(src, shopTitle, shopInventory, shopCoords, shopGroups)
|
||||
if not shopTitle or not shopInventory or not shopCoords then return end
|
||||
Inventory.CreateShop = function(shopTitle, shopInventory, shopCoords, shopGroups)
|
||||
if not shopTitle or not shopInventory then return end
|
||||
if registeredShops[shopTitle] then return true end
|
||||
registeredShops[shopTitle] = true
|
||||
local newVersion = getInventoryNewVersion()
|
||||
@@ -212,7 +216,7 @@ Inventory.CreateShop = function(src, shopTitle, shopInventory, shopCoords, shopG
|
||||
end
|
||||
|
||||
shopData.slots = #shopData.items
|
||||
TriggerClientEvent("inventory:client:OpenInventory", src, "shop", shopTitle, shopData)
|
||||
-- TriggerClientEvent("inventory:client:OpenInventory", src, "shop", shopTitle, shopData)
|
||||
v1ShopData[shopTitle] = shopData
|
||||
print("QB-INVENTORY: You are using an outdated version of qb-inventory, please update to the latest version. Stuff will still work but you are using litterally the most exploitable inventory in fivem.")
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user