Inventory Items

Requires properly setup config for inventory from Installation!

There are two ways of setuping inventory items. You can use integrated Asset Deployer that edit proper server files automatically after executing command or you can do all necessary edits Manually.

Asset Deployer

Available deploys:

  • Resource: ox_inventory

    • items

    • items-images

  • Resource: qs-inventory

    • items

    • items-images

  • Resource: qb-inventory

    • items

    • items-images

    • exports

  • Resource: mf-inventory

    • items

  • Resource: es_extended (esx)

    • items

Running deploy

Execute command xmasdeploy <deploy-resource> [name] in server console, where deploy-resource is needed and represents resource from Available Deploys and name is optional (if it's not filled, all deploys for resource will be deployed) and represents specific deploy for resource.

Manually

ox_inventory

  1. Open ox_inventory/data/items.lua file.

  2. Add these items:

    ['xmas_gift'] = {
        label = 'Unpacked Gift',
        weight = 100,
        stack = false,
        close = true,
        consume = 0,
        server = {
            export = 'rcore_xmas.xmas_gift'
        }
    },

    ['xmas_packed_gift'] = {
        label = 'Packed Gift',
        weight = 250,
        stack = false,
        close = true,
        consume = 0,
        server = {
            export = 'rcore_xmas.xmas_packed_gift',
        }
    },

    ['xmas_tree'] = {
        label = 'Christmas Tree',
        weight = 350,
        stack = true,
        close = true,
        consume = 0,
        server = {
            export = 'rcore_xmas.xmas_tree'
        }
    },

    ['xmas_star'] = {
        label = 'Christmas Star',
        weight = 50,
        stack = true,
        close = true,
        consume = 0,
        export = 'rcore_xmas.xmas_star'
    },

    ['xmas_decor'] = {
        label = 'Christmas Decor',
        weight = 50,
        stack = true,
        close = true,
        consume = 0,
        export = 'rcore_xmas.xmas_decor'
    }
  1. Copy images from rcore_xmas/assets/inventory_images/ to ox_inventory/web/images/.

  2. Restart your server. Server need to be restarted for proper registration of usable items!

qb-inventory / qs-inventory

  1. Open qb-core/shared/items.lua / qs-inventory/shared/items.lua file.

  2. Add these items:

    ['xmas_gift'] = {
        ['name'] = 'xmas_gift',
        ['label'] = 'Unpacked Gift',
        ['weight'] = 100,
        ['type'] = 'item',
        ['image'] = 'xmas_gift.png',
        ['unique'] = true,
        ['useable'] = true,
        ['shouldClose'] = true,
        ['combinable'] = nil
    },
    ['xmas_packed_gift'] = {
        ['name'] = 'xmas_packed_gift',
        ['label'] = 'Packed Gift',
        ['weight'] = 250,
        ['type'] = 'item',
        ['image'] = 'xmas_packed_gift.png',
        ['unique'] = true,
        ['useable'] = true,
        ['shouldClose'] = true,
        ['combinable'] = nil
    },
    ['xmas_tree'] = {
        ['name'] = 'xmas_tree',
        ['label'] = 'Christmas Tree',
        ['weight'] = 350,
        ['type'] = 'item',
        ['image'] = 'xmas_tree.png',
        ['unique'] = false,
        ['useable'] = true,
        ['shouldClose'] = true,
        ['combinable'] = nil
    },
    ['xmas_star'] = {
        ['name'] = 'xmas_star',
        ['label'] = 'Christmas Star',
        ['weight'] = 50,
        ['type'] = 'item',
        ['image'] = 'xmas_star.png',
        ['unique'] = false,
        ['useable'] = true,
        ['shouldClose'] = true,
        ['combinable'] = nil,
    },
    ['xmas_decor'] = {
        ['name'] = 'xmas_decor',
        ['label'] = 'Christmas Decor',
        ['weight'] = 50,
        ['type'] = 'item',
        ['image'] = 'xmas_decor.png',
        ['unique'] = false,
        ['useable'] = true,
        ['shouldClose'] = true,
        ['combinable'] = nil,
    }
  1. Find weapon_snowball and set unique to false!

  2. Copy images from rcore_xmas/assets/inventory_images/ to qb-inventory/html/images/ / qs-inventory/html/images/.

  3. qb-inventory: Put these 3 lines at the bottom of qb-inventory/server/main.lua or use asset deployer mentioned above:

exports('GetStashItems', GetStashItems)
exports('RemoveFromStash', RemoveFromStash)   
exports('SaveStashItems', SaveStashItems)
  1. Restart your server. Server need to be restarted for proper registration of usable items!

mf-inventory

  1. Use asset deployer command, that insert SQL items to database - xmasdeploy mf-inventory items.

es_extended (default esx inventory)

  1. Use asset deployer command, that insert SQL items to database - xmasdeploy es_extended items.

Last updated