Administrator Guide
This guide covers admin tools, troubleshooting, and management for ARS iClothing.
Table of Contents
Section titled “Table of Contents”Admin Commands
Section titled “Admin Commands”/reloadclothing
Section titled “/reloadclothing”Reloads a player’s clothing data from the database.
Usage:
/reloadclothingWhat it does:
- Fetches the player’s saved clothing data from the
ars_iclothingdatabase table - Applies saved clothing to the player’s character
- Removes any clothing the player no longer has items for
- Useful for fixing desynced clothing states
When to use:
- A player’s clothing appears incorrect after joining
- Clothing persists on character after the item was removed from inventory
- After a player reports their clothing is not loading properly
- When testing new clothing presets
Note: This command only works on your own character. To reload another player’s clothing, you may need to use console commands or modify the script.
Troubleshooting
Section titled “Troubleshooting”Issue: Clothing stays on character after removing item
Section titled “Issue: Clothing stays on character after removing item”Symptoms: Player removes clothing item from inventory, but character is still wearing the clothing.
Cause: The inventory system did not trigger the removal event, or the skin menu did not reload clothing data.
Solutions:
- Ask the player to rejoin the server
- Use
/reloadclothingon the player (if available) - Add event trigger to your skin menu - see below
Permanent Fix - Add to your skin menu:
When a player changes their skin or clothing through any menu, trigger a reload:
TriggerClientEvent('ars_iclothing:client:reloadClothing', source)For ESX inventories:
TriggerEvent('esx:removeInventoryItem', source, itemname, count)For QBCore inventories:
TriggerEvent('QBCore:Client:OnRemoveInventoryItem', source, itemname, count)Issue: Clothing not loading on player join
Section titled “Issue: Clothing not loading on player join”Symptoms: Player joins server but previously equipped clothing does not appear.
Cause: Database table may not exist, player data is missing, or oxmysql is not loaded.
Solutions:
- Verify the
ars_iclothingtable exists in your database - Check server console for database connection errors
- Ensure
oxmysqlis loaded beforears_iclothinginserver.cfg - Try
/reloadclothingafter the player fully loads (wait 10-15 seconds after spawn)
Check database:
SELECT * FROM ars_iclothing WHERE identifier = 'player:license12345';Issue: Chain snatching not working
Section titled “Issue: Chain snatching not working”Symptoms: Players report that /chainsnatch command does nothing or fails incorrectly.
Checklist:
- Is
Config.ChainSnatch.enabledset totrueinconfig.lua? - Is the target player within the configured distance (default 2.0 meters)?
- Does the target player have a chain equipped?
- Has the cooldown expired (default 30 seconds)?
- Is the target player hands up or cuffed (if
needHandsUpis enabled)? - Is the player trying to snatch from a vehicle (not allowed)?
Debug mode:
Enable Config.DebugMode = true in config.lua to see detailed console logs about chain snatching attempts.
Issue: Items not usable in inventory
Section titled “Issue: Items not usable in inventory”Symptoms: Players cannot use clothing items from their inventory.
Checklist:
- Are items marked as
useable = truein your inventory configuration? - Do item names match exactly what is defined in preset files?
- Are there any console errors when using items?
- Is the inventory script properly triggering item usage events?
Verify item names: Check that item names in your inventory configuration match the keys in preset files exactly. Example:
Inventory:
['chain_ls'] = { ... }Preset file (preset/chains.lua):
items = { ['chain_ls'] = { ... } -- Must match exactly}Issue: Database errors on server start
Section titled “Issue: Database errors on server start”Symptoms: Server console shows MySQL errors related to ars_iclothing table.
Solutions:
- Ensure
oxmysqlis installed and working - Verify the
ars_iclothingtable exists in your database - Check database connection settings in
oxmysqlconfiguration - Ensure table uses correct collation (
utf8mb4_general_ci)
Recreate table:
DROP TABLE IF EXISTS ars_iclothing;CREATE TABLE `ars_iclothing` ( `identifier` VARCHAR(46) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci', `clothing` LONGTEXT NOT NULL DEFAULT '{}' COLLATE 'utf8mb4_general_ci');Common Issues
Section titled “Common Issues”Clothing appears on wrong gender
Section titled “Clothing appears on wrong gender”Cause: Incorrect drawable IDs in preset configuration for male or female variants.
Solution:
Check your custom presets in preset/ folder and ensure drawable IDs are correct for each gender. Test with both male (mp_m_freemode_01) and female (mp_f_freemode_01) models.
Duplicate clothing equipped
Section titled “Duplicate clothing equipped”Cause: Race condition or bug in script logic when replacing items.
Solution:
The script should automatically remove existing items of the same type. If this fails, ask the player to use /reloadclothing or rejoin the server.
Skin menu conflicts
Section titled “Skin menu conflicts”Cause: Skin menu changes clothing but does not notify ars_iclothing.
Solution: Add the reload event trigger to your skin menu script wherever clothing changes:
TriggerClientEvent('ars_iclothing:client:reloadClothing', source)Common locations to add this:
- After player saves skin in skin menu
- After character customization is applied
- After job uniform changes (if job clothing is involved)
Performance issues with many players
Section titled “Performance issues with many players”Cause: Clothing data queries on every player join/spawn.
Solution:
The script caches clothing data in memory after the first database load. If you experience performance issues, check your MySQL server performance and ensure the ars_iclothing table is indexed properly.
Item images not showing
Section titled “Item images not showing”Symptoms: Inventory shows generic or missing icons for clothing items.
Solution:
- Verify image files exist in your inventory’s images folder
- Check image filenames match exactly (case-sensitive)
- Restart the inventory resource or server
- Clear browser cache if using NUI-based inventory
Database Management
Section titled “Database Management”View player clothing data
Section titled “View player clothing data”SELECT * FROM ars_iclothing WHERE identifier = 'license:your-license-key';Replace the identifier with the actual player identifier from your database.
Delete player clothing data
Section titled “Delete player clothing data”DELETE FROM ars_iclothing WHERE identifier = 'license:your-license-key';This removes all saved clothing for that player. Their equipped clothing will be removed on next reload.
Reset all clothing data
Section titled “Reset all clothing data”TRUNCATE TABLE ars_iclothing;Warning: This deletes all player clothing data. Only use this if you want to reset the entire system.
Backup clothing data
Section titled “Backup clothing data”SELECT * FROM ars_iclothing INTO OUTFILE '/tmp/ars_iclothing_backup.csv'FIELDS TERMINATED BY ','ENCLOSED BY '"'LINES TERMINATED BY '\n';Debugging
Section titled “Debugging”Enable Debug Mode
Section titled “Enable Debug Mode”Set in config.lua:
Config.DebugMode = trueThis prints detailed information to the console about:
- Clothing data loading and saving
- Item usage events
- Chain snatching attempts
- Inventory queries
- Error conditions
Common Console Messages
Section titled “Common Console Messages”“Registered Usable Items for clothing type: X”
- Normal startup message showing which clothing types are loaded
“Clothing Data Found in Cache for Identifier: X”
- Clothing data loaded from memory cache (good - no database query)
“Clothing Data Not Found in Cache for Identifier: X”
- First query to database for player data (normal for first spawn)
“No Clothing Data Found in Database for Identifier: X”
- Player has no saved clothing (normal for new players)
“Player Does Not Have Chain Item”
- Chain snatching failed because target does not have the chain item
Support Resources
Section titled “Support Resources”Supported Skin/Appearance Systems
Section titled “Supported Skin/Appearance Systems”The script has built-in support for these systems - no manual integration required:
- illenium-appearance - Client
changeOutfitand serversaveAppearanceevents - qb-clothing - Server
loadPlayerSkinandsaveSkinevents - qb-clothes - Server
loadPlayerSkinevent - fivem-appearance - Server
saveAppearanceand clientsaveevents - esx_skin - Server
saveevent - ak47_inventory - Server
onRemoveItemevent
If you use any of these systems, ARS iClothing automatically reloads clothing when they modify player appearance. No additional code required.
Inventory Integration Checklist
Section titled “Inventory Integration Checklist”- Items marked as
useable = true - Item names match preset file keys exactly
- Inventory triggers removal events on item drop/give
- Skin menu triggers reload on clothing change
- Item images copied to inventory images folder
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.