Configuration

Notify

Notify = function(text, method)
    Your_Notify_Script(text, method)
end

Inventory

GetItemName = function(id, item)
    local itemData = exports.ox_inventory:GetItem(id, item) -- ox
    local itemData = exports['qb-inventory']:GetItemByName(id, item) -- qb
    return itemData and itemData.count or 0
end

CheckCapacity = function(id, name, amount)
    return exports.ox_inventory:CanCarryItem(id, name, amount) -- ox
    return exports['qb-inventory']:CanAddItem(id, name, amount) -- qb
end

AddItem = function(id, name, amount, meta)
    exports.ox_inventory:AddItem(id, name, amount, meta) -- ox
    exports['qb-inventory']:AddItem(id, name, amount, false, meta) -- qb
end

RemoveItem = function(id, name, amount)
    return exports.ox_inventory:RemoveItem(id, name, amount) and true or false -- ox
    return exports['qb-inventory']:RemoveItem(id, name, amount) and true or false -- qb
end

Support Another Inventory Scripts

Config

return {
    debug = false,

    restartingame = true,

    allowedJobs = {
        'ambulance'
    },

     -- Processing props and items
    object = {
        basket = {
            model = 'prop_crate_03a', 
            item = 'farm_basket'
        }
    },

    locale = {
        action = {
            key = 'E',
            putbasket = 'G Put Basket',
            openshop = 'Open Shop'
        },

        farm = {
            seed = 'Start Planting',
            water = 'Give a Water',
            planting = 'Seedling process',
            fertilizer = 'Give a Fertilizer',
            pesticide = 'Give a Pesticide',
            destroy = 'Destroy a Plant',
            checking = 'Checking Plant'
        },

        notify = {
            -- Plant Notify --
            putseed = 'You have planted seed',
            needseed = 'You don\'t have seed',
            basketfull = 'The basket is full',
            usedbasket = 'You are holding a basket',
            nobasket = 'Take basket to continue',
            nowatercan = 'You don\'t have watercan',
            nofertilizer = 'You don\'t have fertilizer',
            nopesticide = 'You don\'t have pesticide',
            candestroy = 'You have destroyed a plant',
            cantdestroy = 'You cannot destroy this plant',
            safeprocess = 'Wait until all the processes are complete',

            -- Shop Notify --
            insufficient = 'Insufficient funds',
            purchase = 'Purchase successful',
            failed = 'Failed to process payment',
            itemsold = 'Item sold successfully',
            invfailed = 'Unable to access the inventory',
            noitem = 'You don\'t have this item or invalid amount'
        }
    }
}

Last updated