#flight-buyers

1 messages · Page 1 of 1 (latest)

lyric drum
#

Random selling price does not work
If I sell 100 units, I get a “Price mismatch, please try again.

lyric drum
#

I sold two items and the amount is doubled, but only one item is consumed.
@covert relic

neat rune
#

Same here
No errors

QB Framework
OX Inv

#

if I set a price it will say 'you dont have enough quantity'

blissful plank
#

@covert relic

covert relic
neat rune
#

only the config

covert relic
neat rune
#

the location for the pawn shop
and the items
that was it really

neat rune
#

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

neat rune
#

@covert relic

covert relic