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:
gononono64 committed 2025-05-24 15:36:05 -05:00
1 parent 7d83c7579b
commit b9f5a3ed64
2 files changed
+8 -4

No files matched your search

+1 -1
View File
@@ -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.
+7 -3
View File
@@ -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