Clothing Bags
Purchasable, permanently-linked Clothing Bags plus Wardrobe Bag storage for QBox, QBCore or ESX servers, built for illenium-appearance.
Requirements
- One of:
es_extended,qbx_core,qb-core(auto-detected, see Framework support below) ox_libox_inventoryillenium-appearanceoxmysql
Framework support
Clothing Bags runs on QBox, QBCore or ESX and detects which one you're running automatically, no config option to set. On start, it checks in this order and uses the first one it finds:
es_extended(ESX)qbx_core(QBox)qb-core(QBCore)
It runs off whichever framework resource is actually present, so there's nothing to select or switch, just make sure your framework starts before as_clothingbags in your server.cfg.
1. Install the resource
- Drop the
as_clothingbagsfolder into yourresourcesdirectory. - Run
sql/install.sqlagainst your database. - Merge the two item entries from
items/ox_inventory_items.luaintoox_inventory/data/items.lua. - Copy
clothing_bag.pngandwardrobe_bag.pngintoox_inventory/web/images/. - Add to your
server.cfg, after your framework (es_extended,qbx_coreorqb-core),ox_lib,ox_inventory,oxmysql, andillenium-appearance:ensure as_clothingbags
2. Add the illenium-appearance menu integration (required)
Clothing Bags has a single entry point: a "Clothing Bags" option inside illenium-appearance's own Clothing Store Options menu (right after "Buy Clothing"), added via illenium-appearance's registerClothingMenuOption export. There's no separate zone or interact point, so this step isn't optional, pick one of the two ways below to get it in place:
Option A: use our pre-patched illenium-appearance build
Astrea Scripts' own illenium-appearance release already has this integration built in, alongside our custom HUD. Install it in place of stock illenium-appearance and as_clothingbags will detect and use it automatically. Nothing further to configure.
Option B: patch your own illenium-appearance copy
Stock illenium-appearance has no built-in way for another resource to add a menu option, which is a known, long-standing gap (there's an open request from another developer on illenium-appearance's own GitHub asking for exactly this). The patch below adds a small, generic extension point that fixes that gap for good, not just for as_clothingbags; any resource can use it going forward.
In your illenium-appearance's client/client.lua:
1. Find this line:
function OpenMenu(isPedMenu, menuType, menuData)
Directly above it, add:
local ExternalClothingMenuOptions = {}
exports("registerClothingMenuOption", function(option)
if type(option) ~= "table" or type(option.title) ~= "string" then return false end
ExternalClothingMenuOptions[#ExternalClothingMenuOptions + 1] = option
return true
end)
2. Inside OpenMenu(), find the menuType == "default" block, which pushes an entry for "Buy Clothing" that looks like this:
menuItems[#menuItems + 1] = {
title = header,
description = _L("clothing.options.description"),
event = "illenium-appearance:client:openClothingShop",
args = isPedMenu
}
Directly after that block, add:
for i = 1, #ExternalClothingMenuOptions do
menuItems[#menuItems + 1] = ExternalClothingMenuOptions[i]
end
3. Save, and restart illenium-appearance before restarting as_clothingbags: it checks for this export once, at its own startup.
That's the entire patch: about 10 lines, purely additive, nothing removed or changed.
3. Configure it
Open config.lua and set Config.Price, Config.WardrobeBag, Config.AllowedModels, Config.AllowedJobs and Config.BlockingStates to tune the economy/behaviour to your server. No location config needed: Clothing Bags shows up wherever illenium-appearance's own Clothing Store menu already does.
Troubleshooting
- Console shows
illenium-appearance does not have registerClothingMenuOption: the menu integration isn't in place yet, either the pre-patched build isn't installed or the Option B patch hasn't been applied. This isn't optional: without it, "Clothing Bags" has nowhere to appear. Go back to step 2. - Console shows
Registered into illenium-appearance's Clothing Store Options menu: the integration is active and working; you should see "Clothing Bags" in illenium-appearance's own menu, right after "Buy Clothing".
Login