Toggle individual clothing items on/off via chat commands for RSG Framework (RedM).
| Command | Toggles |
|---|---|
/hat |
Hat |
/shirt |
Shirt |
/pants |
Pants |
/boots |
Boots |
/coat |
Coats |
/closedcoat |
Closed coats |
/gloves |
Gloves |
/poncho |
Poncho |
/vest |
Vest |
/sleeve |
Sleeve style |
/eyewear |
Eyewear |
/belt |
Belts |
/cloak |
Cloak |
/chaps |
Chaps |
/mask |
Mask |
/neckwear |
Neckwear |
/accessories |
Accessories |
/gauntlets |
Gauntlets |
/neckties |
Neckties |
/loadouts |
Loadouts |
/suspenders |
Suspenders |
/satchels |
Satchel |
/gunbelt |
Gun belt |
/buckle |
Buckle |
/skirt |
Skirt |
/armor |
Armor |
/hairaccessories |
Hair accessories |
/leftring |
Left ring |
/rightring |
Right ring |
/leftholster |
Left holster |
/rightholster |
Right holster |
/collar1 |
Collar (sleeves up) |
/collar2 |
Collar (sleeves down) |
/undress |
Remove all clothing |
/dress |
Wear all stored clothing |
Edit config.lua:
Config.RequiredPermission— set to an ace name (e.g.'wardrobe') to restrict all commands to players with thecommand.<name>ace. Leave empty for no restriction.Config.ClothingComponents— defines each clothing slot by name, clothes cache key, state field, and component hash.Config.SkinColours— maps body size/skin tone combinations to component indices.
To restrict commands, set in config.lua:
Config.RequiredPermission = 'wardrobe'Then in your server config:
add_ace group.admin command.wardrobe allow
-- Toggle a clothing item by its config name
exports['rsg-wardrobe']:ToggleClothing(name)
-- Remove all clothing from the local player
exports['rsg-wardrobe']:RemoveAllClothing()
-- Check if a specific clothing item is currently worn (returns boolean)
local wearing = exports['rsg-wardrobe']:IsWearing(name)Example:
exports['rsg-wardrobe']:ToggleClothing('hat')
if exports['rsg-wardrobe']:IsWearing('mask') then
print('Player is wearing a mask')
end-- Toggle a clothing item for a specific player
exports['rsg-wardrobe']:TogglePlayerClothing(source, name)
-- Remove all clothing from a specific player
exports['rsg-wardrobe']:RemovePlayerClothing(source)
-- Dress a player (wear all stored clothing from DB)
exports['rsg-wardrobe']:DressPlayer(source)Example:
-- Force remove mask when entering jail
exports['rsg-wardrobe']:TogglePlayerClothing(source, 'masks')
-- Strip all clothing on arrest
exports['rsg-wardrobe']:RemovePlayerClothing(source)
-- Re-dress on release
exports['rsg-wardrobe']:DressPlayer(source)- Ensure all dependencies are installed and started.
- Add
ensure rsg-wardrobeto your server config. - Configure
config.luaas needed.