Skip to content

Installation Guide

This guide covers installing ARS iClothing on your FiveM server. The script requires oxmysql and ox_lib as dependencies, plus either ESX or QBCore framework.

  • oxmysql - MySQL database handler
  • ox_lib - Required for notifications, skill checks, and utility functions
  • es_extended (ESX) or qbcore (QBCore) - Your server’s framework

Download the resource and place it in your server’s resources directory:

server-data/resources/[ars]/ars_iclothing/

Open config.lua and set your framework:

Config.Framework = 'esx' -- Use 'esx' for ESX or 'qb' for QBCore
Config.Target = true -- Enable target system support

Add the resource to your server.cfg:

ensure oxmysql
ensure ox_lib
ensure es_extended -- or qb-core
ensure ars_iclothing

Start your server once with ars_iclothing enabled. The script includes an automatic item list generator (server/makeitemlist.lua) that will create:

  • INSTALL ME/items.sql - SQL INSERT statements for ESX inventories
  • INSTALL ME/item_list.txt - QB-Core format item definitions

These files are auto-generated from your preset configurations, so they always include all your custom clothing items.

Run the included SQL file to create the required table:

CREATE TABLE IF NOT EXISTS `ars_iclothing` (
`identifier` VARCHAR(46) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
`clothing` LONGTEXT NOT NULL DEFAULT '{}' COLLATE 'utf8mb4_general_ci'
);

The script provides pre-generated item definitions in INSTALL ME/ folder. You can also generate your own by starting the server once - see step 4.

Add items to your inventory’s items configuration file:

ox_inventory: ox_inventory/data/items.lua ak47_inventory: ak47_inventory/shared/items.lua

['chain_ls'] = {
label = 'Chain ls',
weight = 1,
stack = true,
close = true,
description = 'A stylish LS chain.'
}
['skull_bracelet'] = {
label = 'Skull bracelet',
weight = 1,
stack = true,
close = true,
description = 'A skull-themed bracelet.'
}

Note: Copy all items from INSTALL ME/ox items.txt and add them to your items file.

Add items to your framework’s shared items file:

chain_ls = {
name = 'chain_ls',
label = 'Chain ls',
weight = 200,
type = 'item',
image = 'chain_ls.png',
unique = false,
useable = true,
shouldClose = true,
description = 'A stylish LS chain.'
}
skull_bracelet = {
name = 'skull_bracelet',
label = 'Skull bracelet',
weight = 200,
type = 'item',
image = 'skull_bracelet.png',
unique = false,
useable = true,
shouldClose = true,
description = 'A skull-themed bracelet.'
}

Note: Copy all items from INSTALL ME/item_list.txt and add them to your items file.

ESX-based inventories use SQL to add items directly to the database:

INSERT INTO items (name, label, weight, rare, can_remove) VALUES
('chain_ls', 'Chain ls', 200, 0, 1),
('skull_bracelet', 'Skull bracelet', 200, 0, 1);

Note: Adjust table and column names based on your ESX inventory implementation. Some inventories use canRemove instead of can_remove. Check your existing items table structure before running these queries.

Copy the included item images to your inventory’s image folder.

Included image source: ars_iclothing/INSTALL ME/images for inventory/

Common destination paths:

  • ox_inventory: ox_inventory/web/images/
  • qb-inventory: qb-inventory/html/images/
  • qs-inventory: qs-inventory/html/images/
  • ps-inventory: ps-inventory/html/images/
  • ak47_inventory: ak47_inventory/web/build/images/

Copy all PNG files from the source folder to your inventory’s images folder, then restart the inventory resource or your server if icons do not appear.

  1. Start your server and check console for any errors
  2. Verify the ars_iclothing table was created in your database
  3. Join the server and test using a clothing item from your inventory
  4. Test the /chainsnatch command near another player with a chain equipped

The script uses ox_lib for localization with English language file provided. To add support for other languages:

  1. Create a new locale file in locales/ folder: locales/your_language.json
  2. Copy the structure from en.json and translate the values
  3. Set your server’s preferred language in ox_lib configuration

Example locale structure:

{
"iclothing": "iClothing",
"dont_have_item": "Clothing removed because you do not have it in your inventory.",
"chainsnatch_help": "Snatch a chain from a player.",
"cannot_snatch_in_vehicle": "You cannot snatch chain while in a vehicle.",
"cooldown_active": "You must wait before you can snatch again.",
"no_players_nearby": "There are no players nearby to snatch a chain from.",
"player_is_not_compatible": "Player is not Handcuffed or Hands Up.",
"you_have_snatched_chain": "You have snatched a chain from player.",
"your_chain_has_been_snatched": "Your chain has been snatched.",
"target_does_not_have_chain": "Target does not have a chain.",
"chain_snatch_failed": "Chain snatch failed."
}

If using QBCore with ox_inventory, modify ox_inventory/client.lua:

Replace:

if shared.framework == 'esx' then
TriggerEvent('esx:removeInventoryItem', item.name, item.count)
end

With:

if shared.framework == 'esx' then
TriggerEvent('esx:removeInventoryItem', item.name, item.count)
elseif shared.framework == 'qb' then
TriggerEvent('QBCore:Client:OnRemoveInventoryItem', item.name, item.count)
end

If clothing remains on player after removing items, modify the RemoveItem function in qb-inventory/server/functions.lua. Add this line after item removal:

if player then
TriggerClientEvent('QBCore:Client:OnRemoveInventoryItem', player.PlayerData.source, item)
end

If clothing stays on the character after removing items, add the appropriate event trigger to your inventory script:

TriggerEvent('esx:removeInventoryItem', source, itemname, count) -- for ESX
TriggerEvent('QBCore:Client:OnRemoveInventoryItem', source, itemname, count) -- for QBCore

If clothing remains on the character after using a skin menu, add the following code to your skin menu script when clothing changes:

TriggerClientEvent('ars_iclothing:client:reloadClothing', source)

This ensures the script reloads clothing data whenever a player changes their skin.

Supported skin menus (no modification needed - built-in integration):

  • illenium-appearance - Client and server events supported
  • qb-clothing - Save and load events supported
  • qb-clothes - Load event supported
  • fivem-appearance - Client and server events supported
  • esx_skin - Save event supported
  • ak47_inventory - onRemoveItem event supported

No manual integration needed for these systems - the script automatically handles them.

To update to a new version:

  1. Stop your server
  2. Replace the existing ars_iclothing folder with the new version
  3. Keep your config.lua changes if you made customizations
  4. Restart your server

No database migrations are typically required for updates.

Clothing stays on player after removing item

Section titled “Clothing stays on player after removing item”

Add the event trigger to your inventory or skin menu as documented above in the Inventory Compatibility Notes section.

  • Ensure target player has a chain equipped
  • Check that you are within the configured distance (default 2.0 meters)
  • Verify cooldown has expired (default 30 seconds)
  • Confirm target player is hands up or cuffed (if needHandsUp is enabled)
  • Check that Config.ChainSnatch.enabled is set to true
  • Ensure items are marked as useable = true in your inventory
  • Verify item names match exactly what is defined in preset files
  • Check server console for errors when using items

Ensure oxmysql is loaded before ars_iclothing:

ensure oxmysql
ensure ars_iclothing

Note: This guide is written by a third party. If you find any incorrect or outdated information, please contact us on Discord so we can update it for you.