Cuxial Appearance needs no SQL import. It creates its tables on first start and fills the shop list with the default shops.
Check the dependencies
These must be installed and working first:
ox_liboxmysqlcuxial_bridge2.24.1 or later, with one of the supported frameworks: QBox, QBCore or ESX- OneSync enabled on the server
Optional, each one unlocks a part of the script:
- An inventory (
ox_inventoryorqb-inventory): garments as items, outfit items, bags, trimmer and second hand. - A target (
sleepless_interact,ox_targetorqb-target): the outfit bag placed on the ground. cuxial_appearance_photosplusscreencaptureorscreenshot-basic: catalogue photos.cuxial_emotes: poses in the menu and the trimmer.
Remove other clothing scripts
Stop any other appearance or clothing resource. Two of them fight over the same ped and the same events.
The resource creates tables named appearance and outfits. If your database already has tables with those names from another script, back up the database before the first start.
Copy the resources
Place cuxial_appearance and cuxial_appearance_photos inside your resources directory. Keep the folder names as they are.
Add the items
Add these items to your inventory. The example is for ox_inventory:
['cuxial_clothing'] = {
label = 'Garment',
weight = 220,
stack = false,
close = true,
description = 'A garment from your wardrobe. Use it to put it on.',
client = { export = 'cuxial_appearance.useClothing' },
},
['cuxial_garmentbag'] = {
label = 'Garment bag',
weight = 300,
stack = false,
close = false,
consume = 0,
description = 'Holds loose garments.',
},
['cuxial_shopbag'] = {
label = 'Shopping bag',
weight = 0,
stack = false,
close = false,
consume = 0,
description = 'The garments of a purchase. Open it to wear or take them out; it disappears when empty.',
},
['cuxial_outfit'] = {
label = 'Outfit set',
weight = 350,
stack = false,
close = true,
description = 'A complete outfit, packed. Use it to wear it.',
},
['cuxial_outfitbag'] = {
label = 'Outfit bag',
weight = 800,
stack = false,
close = true,
description = 'Holds up to 5 outfits to wear anywhere.',
},
['cuxial_trimmer'] = {
label = 'Trimmer',
weight = 350,
stack = false,
close = true,
description = 'Shaves a head clean. Hair takes a while to grow back.',
},Then copy the icons from the install folder of the resource into the image folder of your inventory.
The item names can be changed in shared/config.lua (wardrobe.item, wardrobe.bag.item, wardrobe.purchase.shopBag.item, outfits.setItem, outfits.bagItem, trimmer.item). cuxial_garmentbag and cuxial_shopbag are only used in inventory mode.
Garment items must never stack: each one carries its own piece, drawable and texture.
Set the convars
All of them are optional.
# Language (en and es are included)
setr ox:locale "en"
# Inventory mode: 1 = on, 0 = off (default)
setr cuxial_appearance:inventory 0
# Discord webhook for the logs
set cuxial_appearance_webhook "https://discord.com/api/webhooks/..."
# Lets the photo studio save its photos
add_filesystem_permission cuxial_appearance write cuxial_appearance_photos
# Debug traces in the console
setr cuxial_appearance_debug "0"Inventory mode needs an ox_inventory that provides the clothing panel and the containers of the garment bag and the shopping bag. On a stock inventory leave it at 0: taking garments off and putting them on from the wardrobe command still works.
The webhook goes in server.cfg, never in shared/config.lua. The name of the convar can be changed in logs.convar.
Start the resources
Start Cuxial Appearance after its dependencies, your framework, your inventory and your target:
ensure ox_lib
ensure oxmysql
# your framework here (qbx_core, qb-core or es_extended)
# your inventory and your target here
ensure cuxial_bridge
# optional
ensure cuxial_emotes
ensure screencapture
ensure cuxial_appearance_photos
ensure cuxial_appearanceNo SQL to run. On first start the resource creates its tables and inserts the shops of data/shops.lua.
Updating from 2.0. On the first start, whitelist grants move to the new tables appearance_wl_grants and appearance_wl_members, and the old tables appearance_whitelist and appearance_whitelist_players are deleted. Back up those two tables before you update. If any grant fails to copy, the old tables are kept and the move runs again on the next start.
Moved grants apply to both sexes and are matched by number only. Capture them again with the capture button so they survive new clothing packs.
Connect your multicharacter
A new character needs the creator. Your multicharacter resource has to call it once the character is spawned:
exports.cuxial_appearance:InitialCreation(function()
-- the player has finished the creator
end)Resources that trigger qb-clothes:client:CreateFirstCharacter need no change. Cuxial Multichar already does this. The saved appearance is applied on its own every time a character loads.
Check that it works
- Join with a new character. The creator opens.
- Walk into a clothing shop and press E. The menu opens with the price of that shop.
- Change a garment and confirm. The money is taken and the look is kept after reconnecting.
- As staff, run
/adminclothing. The panel opens with the list of shops. - Check the server console: there must be no warning about a missing item.
Next: adjust prices, shops and restrictions in Configuration.
