diff --git a/lib/entities/client/client_entity.lua b/lib/entities/client/client_entity.lua index 63c52af..33adce7 100644 --- a/lib/entities/client/client_entity.lua +++ b/lib/entities/client/client_entity.lua @@ -74,7 +74,7 @@ function ClientEntity.Register(entityData) -- Use Point system for proximity checks -- print(string.format("[ClientEntity] Registering entity %s at %s", entityData.id, json.encode(entityData))) - Point.Register(entityData.id, entityData.coords, entityData.spawnDistance or 50.0, entityData, SpawnEntity, RemoveEntity, function() end) + return Point.Register(entityData.id, entityData.coords, entityData.spawnDistance or 50.0, entityData, SpawnEntity, RemoveEntity, function() end) end --- Unregisters an entity and removes it from the world if spawned. diff --git a/modules/inventory/qb-inventory/server.lua b/modules/inventory/qb-inventory/server.lua index 6de16e3..73f45ca 100644 --- a/modules/inventory/qb-inventory/server.lua +++ b/modules/inventory/qb-inventory/server.lua @@ -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