#flight-buyers
1 messages · Page 1 of 1 (latest)
@covert relic
I sold two items and the amount is doubled, but only one item is consumed.
@covert relic
Same here
No errors
QB Framework
OX Inv
if I set a price it will say 'you dont have enough quantity'
@covert relic
what did u change 👀
what did u change
the location for the pawn shop
and the items
that was it really
Fixed
if Config.Inventory == "ox" then
if data.action == "has" then
if not exports.ox_inventory:GetItem(data.src, data.item, nil, true) then return false end
return exports.ox_inventory:GetItemCount(data.src, data.item, nil, true) >= data.quantity
elseif data.action == "add" then
exports.ox_inventory:AddItem(data.src, data.item, data.amount or 1)
elseif data.action == "remove" then
exports.ox_inventory:RemoveItem(data.src, data.item, data.quantity or 1)
end
elseif Config.Inventory == "qb" then
local player = CORE.Functions.GetPlayer(data.src)
if data.action == "has" then
local item = player.Functions.GetItemByName(data.item)
return item and item.amount >= data.quantity
elseif data.action == "add" then
player.Functions.AddItem(data.item, data.amount or 1, data.info)
elseif data.action == "remove" then
player.Functions.RemoveItem(data.item, data.quantity or 1)
end
elseif Config.Inventory == "esx" then
if data.action == "has" then
return CORE.GetPlayerFromId(data.src).hasItem(data.item) ~= nil
elseif data.action == "add" then
CORE.GetPlayerFromId(data.src).addInventoryItem(data.item, data.amount)
elseif data.action == "remove" then
CORE.GetPlayerFromId(data.src).removeInventoryItem(data.item, data.quantity or 1)
end
end
end```
on remove you had quantity as amount
@covert relic
thanks bro