Installation
Installation
ML Clothing is a clothing and armor system with a bundled advanced inventory addon. Clothing pieces, armor plates, and bags are real inventory items that equip into fixed slots. Persistence of worn appearance is delegated to your appearance script or to inventory item metadata; the resource itself creates no clothing table.
Quick Start
Place ml_clothing in your resources folder and start it after its dependencies.
1ensure oxmysql
2ensure ox_lib
3ensure ml_bridge
4ensure ox_inventory
5ensure ml_clothingThe ox_inventory line is the included advanced inventory that ships with the product. It is not a separate download.
The package adds a streamed armor plate prop and a DLC_ITYP_REQUEST in the manifest. After adding the resource for the first time, restart the server so the asset streams. A live refresh alone can skip newly added stream files.
Database
ML Clothing does not create a clothing or appearance table. Worn outfits are saved through the detected appearance script, or through inventory item metadata when running in native mode.
The one table the resource creates belongs to the admin panel audit log. It is created automatically on first start; no manual SQL import is required.
1CREATE TABLE IF NOT EXISTS ml_invadmin_audit (
2 id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
3 created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
4 admin VARCHAR(64),
5 admin_src INT,
6 action VARCHAR(64),
7 detail TEXT
8)This table stores admin actions performed through the inventory admin panel (item edits, stash edits, give and remove operations). It is not used for player clothing.
Item Registration
The clothing pieces, armor plates, and bag are inventory items. Register them in your inventory items file. The item definitions ship in _INSTALL/items.lua, and matching icons ship in _INSTALL/images/.
Clothing items (each stack = false, close = true):
hat: Hat, 300 gmask: Mask, 200 gglasses: Glasses, 100 gearrings: Earrings, 50 gchain: Chain, 100 gwatch: Watch, 150 gbracelet: Bracelet, 100 gundershirt: Undershirt, 250 gjacket: Jacket, 500 gbodyarmor: Body Armor, 1500 ggloves: Gloves, 150 gpants: Pants, 400 gshoes: Shoes, 600 gbag: Bag, 800 gdecals: Decals, 50 g
Armor plate items (each stack = true, close = true):
lightplate: Light Plate, 500 g. 25% armor when inserted in a plate carrierheavyplate: Heavy Plate, 1200 g. 50% armor when inserted in a plate carrierbrokenplate: Broken Plate, 400 g. No protection, can be repaired
Copy the PNG files from _INSTALL/images/ into your inventory images folder so every registered item shows an icon.
Verify
Start the server and confirm the resource comes up without errors. With Config.Debug = true you should see the appearance detection line in the server console, for example:
1[SERVER] Detected appearance script: bl_appearanceor, when no appearance script is running:
1[SERVER] No appearance script detected, using native modeThen in game:
- A clothing item (for example
jacket) equips into its fixed slot when used, and the ped component updates. bodyarmoropens a plate carrier stash where plate items can be inserted.- A
bagopens its own stash sized from the bag drawable.
Clothing item does nothing when used. The item name must match a key in Config.ClothingItems. Register the item in your inventory items file using the exact names from _INSTALL/items.lua. An unregistered item has no metadata and will not equip.
The armor plate prop does not appear. The prop streams from a DLC_ITYP_REQUEST declared in the manifest. Restart the server after first install; a hot refresh can skip the newly added stream asset.
Outfit does not save between sessions. ML Clothing delegates appearance persistence to the detected appearance script. Confirm illenium-appearance or bl_appearance is started before ml_clothing, or run in native mode where clothing is kept in item metadata. Check the detection line in the console with Config.Debug = true.
Admin panel says insufficient permissions. The panel checks admin status server side. Set Config.AdminAce in shared/invadmin_config.lua to an ACE your account holds, or grant the framework admin group that Bridge.HasPermission recognizes.
Items appear in the wrong slot or get dropped. Clothing slots 11 to 25 are reserved. If two items map to the same slot number in Config.ClothingItems, one is dropped on equip. Each clothing item must have a unique slot number.