Documentation

KAIRO OutfitBag

Installation

Requirements

WhatRequiredNotes
oxmysqlYesThe only hard dependency.
FrameworkNoESX Legacy, QBCore or Qbox. Without one it runs standalone (identifier = license).
InventoryNoNeeded for the outfitbag item. Without one: Config.Inventory = 'none' and Config.Command.
TargetNoox_target or qb-target, or the text UI.
Clothing systemNoNeeded to sync the wardrobe and save the skin. Without one, the bag keeps its own list.

1. Copy the resource

Download the resource from portal.cfx.re → Granted Assets and copy the kairo_outfitbag folder into resources/.

The folder name must stay kairo_outfitbag: ox_inventory calls the kairo_outfitbag.useBag export.

2. Add the item

Pick the file by inventory, not by framework: for example ESX with ox_inventory uses the ox_inventory one. The files are also in install/items/.

InventoryWhere the item goes
ox_inventory (Qbox too)ox_inventory/data/items.lua
qb-inventory, ps-inventory, lj-inventory, codem-inventory, core_inventory on QBCoreqb-core/shared/items.lua
qs-inventoryqs-inventory/shared/items.lua
origen_inventorylike QBCore or ESX (see the file)
ESX (default inventory, esx_inventoryhud, chezza…)database table items

ox_inventory

ox_inventory/data/items.lua
['outfitbag'] = {
    label = 'Borsone vestiti',
    weight = 2000,
    stack = false,
    close = true,
    description = 'Borsone con i tuoi outfit. Posalo a terra per cambiarti ovunque.',
    server = {
        export = 'kairo_outfitbag.useBag'
    }
},

QBCore (qb, ps, lj, codem, core)

qb-core/shared/items.lua
outfitbag = { name = 'outfitbag', label = 'Borsone vestiti', weight = 2000, type = 'item', image = 'outfitbag.png', unique = true, useable = true, shouldClose = true, description = 'Borsone con i tuoi outfit. Posalo a terra per cambiarti ovunque.' },

With the old qb-core format use the ['outfitbag'] = { ['name'] = 'outfitbag', … } line found in install/items/qb-inventory.lua.

qs-inventory

qs-inventory/shared/items.lua
['outfitbag'] = {
    ['name'] = 'outfitbag',
    ['label'] = 'Borsone vestiti',
    ['weight'] = 2000,
    ['type'] = 'item',
    ['image'] = 'outfitbag.png',
    ['unique'] = true,
    ['useable'] = true,
    ['shouldClose'] = true,
    ['rare'] = 'common',
    ['description'] = 'Borsone con i tuoi outfit. Posalo a terra per cambiarti ovunque.'
},

ESX

SQL
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
    ('outfitbag', 'Borsone vestiti', 2, 0, 1)
ON DUPLICATE KEY UPDATE `label` = VALUES(`label`);

Old ESX 1.x, with a limit column instead of weight: use the commented query in install/items/esx_items.sql.

3. Copy the image

Copy install/images/outfitbag.png into your inventory’s image folder. The file must be named exactly like the item: outfitbag.png.

InventoryImage folder
ox_inventoryox_inventory/web/images/
esx_inventoryesx_inventory/web/images/
qb / ps / lj-inventory<inventory>/html/images/
qs-inventoryqs-inventory/html/images/
codem-inventorycodem-inventory/html/itemimages/
core_inventorycore_inventory/html/img/
origen_inventoryorigen_inventory/html/images/

After copying it, restart the inventory. If the image still doesn’t show, clear the FiveM cache on the client.

4. Database

Nothing to import: if the bag uses its own outfit list, the kairo_outfitbag_outfits table is created and updated automatically on start. Only if your database user lacks the CREATE TABLE permission, import install/sql/outfitbag.sql once.

5. Start the resource

server.cfg
ensure oxmysql
ensure es_extended          # or qb-core / qbx_core (if you use them)
ensure ox_inventory         # or your inventory (if you use one)
ensure ox_target            # optional
ensure illenium-appearance  # or your clothing system (if you use one)
ensure kairo_outfitbag

The recommended order is after framework, inventory, target and clothing system. If you can’t keep it, the bag adapts anyway: see Startup order.

Check

  1. Start the server and look for the [kairo_outfitbag] framework: … | inventory: … | wardrobe: … line in the console.
  2. Give yourself the outfitbag item and check it has its image.
  3. Use it: the bag is placed on the ground.
  4. Open it: outfits on the right, preview on the left.
  5. Hover the sections of an outfit: only the preview changes.
  6. Click a section: the character changes.
  7. Log out and back in: the clothes must still be on.
  8. With WardrobeSync = true save an outfit in the bag and check it appears in the closet, and vice versa.
With Config.Debug = true the F8 console shows useful messages (preview: …, skin save: …). On a live server set it back to false.