Installation
Follow this guide to install and configure kartik-clothing on your FiveM server.
๐ Requirements & Dependencies
Before installing, ensure your server meets the following requirements:
- FiveM Server Build: 5839 or higher (Lua 5.4 enabled)
ox_lib(Required)oxmysql(Required)- MySQL 8.0+ or MariaDB 10.5+
๐๏ธ Database Setup
kartik-clothing manages schema tables automatically on resource start via server/schema.lua. However, if you are setting up manually or inspecting your database, the resource uses the following core tables:
kc_player_skins: Stores active player skin configurations, ped model, head blend parameters, face features, clothing components, props, tattoos, and makeup.kc_wardrobe: Stores saved player outfit presets, names, and component data.kc_shops: Stores dynamically configured shop locations, shop types (clothing, barber, tattoo, wardrobe), ped models, blips, and markers created via/shopmanager.kc_designs: Stores user-submitted custom clothing designs, canvas layer data, baked textures, creator Citizen IDs, and moderation status.kc_credits: Stores player design credit balances for Tebex monetization and studio usage.
๐ฅ Resource Installation
-
Download & Place Resource: Extract the
kartik-clothingfolder into your server'sresources/[kartik]/directory:resources/ โโโ [kartik]/ โโโ kartik-clothing/ โโโ client/ โโโ server/ โโโ shared/ โโโ bridge/ โโโ build/ โโโ fxmanifest.lua -
Ensure Load Order in
server.cfg: Addkartik-clothingto yourserver.cfgafterox_libandoxmysql:# Core Dependencies ensure ox_lib ensure oxmysql # Framework (QBX / QBCore / ESX) ensure qbx_core # or qb-core / es_extended # Clothing Resource ensure kartik-clothing
๐งฑ Filesystem Sandbox (add_unsafe_child_process_permission)
Only relevant if you use the Custom Garment Designer Studio or the bulk thumbnail capture tool (/takeshots), and only on recent FXServer artifacts (~25770+) which run resources under Node's permission model.
Those are the only two features that write to disk: the Studio bakes finished garments (textures, normal maps, .ymt/meta), and /takeshots writes garment previews. Everything they write goes inside kartik-clothing's own folder, which the sandbox allows, so on most servers there is nothing to configure here.
If your server's sandbox refuses the write anyway, baking fails and the console shows one of:
Access to this API has been restricted. Use --allow-fs-write to manage permissions.
ERR_ACCESS_DENIED
the server sandbox blocked this write and also blocked the child-process fallbackThe resource then retries the write through a short-lived OS child process, which lives outside the permission model. Granting that fallback is one line in server.cfg:
add_unsafe_child_process_permission "kartik-clothing"[!IMPORTANT] Put it above your
ensurelines and restart the server, permissions are read at boot, so restarting just the resource does nothing.
[!NOTE] "unsafe" is FXServer's own wording for outside the sandbox, not a warning about this resource. The alternative is one
add_filesystem_permission โฆ writeline per target resource; the single child-process grant is simpler and is what the error message tells you to paste. Servers on artifacts older than ~25770 have no filesystem sandbox and need none of this.
If you would rather not grant it, everything except baking and thumbnail capture works untouched, shops, locks, wardrobe, barber, tattoos and peds never write to disk.
๐ Item-Based Clothing & clothing_item Setup
kartik-clothing features built-in item-based clothing support, allowing purchased garments to arrive in player inventories as wearable items with full metadata (drawable, texture, palette, stable clothing hash, preview image URL). Enabled in shared/config_inventory.lua via Config.Inventory.Enabled = true.
When UseGenericItem = true (default), all clothing pieces (jackets, pants, hats, masks, accessories, etc.) are issued as a single item registered in your inventory: clothing_item.
If item-based clothing is enabled on your server, you must register clothing_item (or individual slot items) in your inventory system.
1. ox_inventory Setup
Add clothing_item to ox_inventory/data/items.lua:
['clothing_item'] = {
label = 'Clothing Item',
weight = 100,
stack = false,
close = true,
description = 'Generic wearable clothing piece',
client = {
export = 'kartik-clothing.useClothingItem'
}
},2. qb-core Setup
Add clothing_item to qb-core/shared/items.lua:
['clothing_item'] = {
name = 'clothing_item',
label = 'Clothing Item',
weight = 100,
type = 'item',
image = 'clothing_item.png',
unique = true,
useable = true,
shouldClose = true,
combinable = nil,
description = 'Generic wearable clothing piece'
},3. qs-inventory / codem-inventory Setup
Add clothing_item into your inventory's items configuration file (e.g. qs-inventory/shared/items.lua or codem-inventory/config/items.lua) as a non-stackable usable item (unique = true, usable = true).
4. Slot-Specific Item Mode (UseGenericItem = false)
If you set Config.Inventory.UseGenericItem = false in shared/config_inventory.lua, garments use dedicated item names per body slot (mask, gloves, pants, bag, shoes, accessory, undershirt, armor, torso, hat, glasses, earring, watch). You must register each of these individual item names in your inventory configuration using the same usability parameters as above.
๐ Replacing illenium-appearance or qb-clothing
kartik-clothing features full compatibility layers with illenium-appearance and qb-clothing.
Replacing illenium-appearance
- Stop or remove
illenium-appearancefrom yourserver.cfg. kartik-clothingautomatically registers equivalent exports likestartPlayerCustomization,openClothingShop,getPedAppearance, andsetPedAppearance.- If using
qbx_spawn, no code changes are required askartik-clothinghandles standard multicharacter customization callbacks.
Replacing qb-clothing
- Stop or remove
qb-clothingfrom yourserver.cfg. kartik-clothinghandlesqb-clothingnet events and exports such asqb-clothing:client:openMenuandqb-clothing:saveOutfit.
๐งฌ Multicharacter Integration
kartik-clothing works seamlessly with multicharacter resources like qbx_spawn, qb-multicharacter, zsx_multicharacter, um-multicharacter, um-ronin-multicharacter, op-multicharacter, and esx_multicharacter.
For detailed step-by-step code edit guides for each multicharacter system, visit the Multicharacter Integration Guides:
- โก um-multicharacter Guide, Step-by-step bridge file setup for
um-multicharacter. - ๐ข QBX Multicharacter Guide, Out of the box support due to built-in backward compatibility (zero code edits required).
- โก op-multicharacter Guide, Drop-in integration files for
op-multicharacter.
[!TIP]
kartik-clothingincludes drop-inillenium-appearancecompatibility exports, so configuring any multicharacter script to useillenium-appearanceworks out of the box without changing internal script exports.
Preview
Explore the visual interfaces, customization screens, dynamic shop manager, custom garment designer studio, and monetization features included in kartik-clothing.
Compatibility
kartik-clothing features multi-framework bridges and event aliasing to work seamlessly across QBX Core, QBCore, ESX Legacy, and Standalone frameworks.