Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak removeOwnedItem within modeler.lua to use ox_inv #239

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/modeler.lua
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ Modeler = {
RemoveOwnedItem = function (self, data)
if data.type == 'storage' then
local property = Property.Get(self.property_id).storageTarget[data.entity]
local hasItems = Framework[Config.Radial].inventoryHasItems(property)
local hasItems = Framework[Config.Inventory].inventoryHasItems(property)
if hasItems then Framework[Config.Notify].Notify('Stash is not empty', 'error') return end
end
local item = data
Expand Down
2 changes: 1 addition & 1 deletion server/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ end)

lib.callback.register("ps-housing:cb:inventoryHasItems", function(source, name, isOx)
if isOx then
local items = exports.ox_inventory:GetInventoryItems(name)
local items = #exports.ox_inventory:GetInventoryItems(name)
return items and items > 0
end
local query = lib.checkDependency('qb-inventory', '2.0.0') and 'SELECT items FROM inventories WHERE identifier = ?' or 'SELECT items FROM stashitems WHERE stash = ?'
Expand Down