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.
Prerequisites
Section titled “Prerequisites”oxmysql- MySQL database handlerox_lib- Required for notifications, skill checks, and utility functionses_extended(ESX) orqbcore(QBCore) - Your server’s framework
Installation Steps
Section titled “Installation Steps”1. Download and Place Resource
Section titled “1. Download and Place Resource”Download the resource and place it in your server’s resources directory:
server-data/resources/[ars]/ars_iclothing/2. Configure Framework
Section titled “2. Configure Framework”Open config.lua and set your framework:
Config.Framework = 'esx' -- Use 'esx' for ESX or 'qb' for QBCoreConfig.Target = true -- Enable target system support3. Add to Server Config
Section titled “3. Add to Server Config”Add the resource to your server.cfg:
ensure oxmysqlensure ox_libensure es_extended -- or qb-coreensure ars_iclothing4. Run the Script Once (Optional)
Section titled “4. Run the Script Once (Optional)”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 inventoriesINSTALL 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.
5. Import Database
Section titled “5. Import Database”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');Configure Inventory Items
Section titled “Configure Inventory Items”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.
ox_inventory and ak47_inventory
Section titled “ox_inventory and ak47_inventory”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.txtand add them to your items file.
qb-inventory, qs-inventory, ps-inventory
Section titled “qb-inventory, qs-inventory, ps-inventory”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.txtand add them to your items file.
ESX (SQL)
Section titled “ESX (SQL)”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
canRemoveinstead ofcan_remove. Check your existingitemstable structure before running these queries.
Copy Inventory Images
Section titled “Copy Inventory Images”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.
Verification
Section titled “Verification”- Start your server and check console for any errors
- Verify the
ars_iclothingtable was created in your database - Join the server and test using a clothing item from your inventory
- Test the
/chainsnatchcommand near another player with a chain equipped
Localization
Section titled “Localization”The script uses ox_lib for localization with English language file provided. To add support for other languages:
- Create a new locale file in
locales/folder:locales/your_language.json - Copy the structure from
en.jsonand translate the values - 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."}Inventory Compatibility Notes
Section titled “Inventory Compatibility Notes”ox_inventory for QBCore
Section titled “ox_inventory for QBCore”If using QBCore with ox_inventory, modify ox_inventory/client.lua:
Replace:
if shared.framework == 'esx' then TriggerEvent('esx:removeInventoryItem', item.name, item.count)endWith:
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)endqb-inventory (New Version)
Section titled “qb-inventory (New Version)”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)endOther Inventory Systems
Section titled “Other Inventory Systems”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 ESXTriggerEvent('QBCore:Client:OnRemoveInventoryItem', source, itemname, count) -- for QBCoreSkin Menu Integration
Section titled “Skin Menu Integration”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 -
onRemoveItemevent supported
No manual integration needed for these systems - the script automatically handles them.
Updating
Section titled “Updating”To update to a new version:
- Stop your server
- Replace the existing
ars_iclothingfolder with the new version - Keep your
config.luachanges if you made customizations - Restart your server
No database migrations are typically required for updates.
Troubleshooting
Section titled “Troubleshooting”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.
Chain snatching not working
Section titled “Chain snatching not working”- 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
needHandsUpis enabled) - Check that
Config.ChainSnatch.enabledis set totrue
Items not usable
Section titled “Items not usable”- Ensure items are marked as
useable = truein your inventory - Verify item names match exactly what is defined in preset files
- Check server console for errors when using items
Database errors
Section titled “Database errors”Ensure oxmysql is loaded before ars_iclothing:
ensure oxmysqlensure ars_iclothingNote: 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.