Configuration
LB Appearance detects your framework, inventory, target script and upload method by default. The configuration file is located at lb-appearance/config/config.lua, and the store interiors are in lb-appearance/config/stores.
Upload method
Outfit photos and nail designs are uploaded with Config.UploadMethod. With "auto", the upload method is picked in this order:
LBPresigned, if lb-presigned is started before lb-appearanceFivemanage, ifFIVEMANAGE_MEDIA_API_KEYis setQbox, ifQBOX_CDN_API_KEYis set
API keys are set with convars in your server.cfg. Use set, not setr, so that the key stays on the server.
| Upload method | Convar |
|---|---|
Fivemanage | FIVEMANAGE_MEDIA_API_KEY |
Qbox | QBOX_CDN_API_KEY |
LBPresigned | lb-presigned’s own convars. Needs lb-presigned 1.1.0 or newer |
Custom | LB_APPEARANCE_UPLOAD_API_KEY, and LB_APPEARANCE_DELETE_API_KEY |
Custom upload methods
Custom, and other upload methods you add, are set up in lb-appearance/shared/upload.lua. auto doesn’t pick them, so set Config.UploadMethod to the method’s name.
Players’ clients get LB_APPEARANCE_UPLOAD_API_KEY, so use a different key, LB_APPEARANCE_DELETE_API_KEY, for deleting files. Which uploads are saved is decided in lb-appearance/server/upload.lua.
Image generator
The generator takes the images of clothes, props, tattoos etc. shown in the menu. Start it from the admin menu.
The images are named after the paths in the admin menu’s image hosting settings, so set its base URL to where the images are uploaded. The images are square, except for peds and badges, which are 9:16.
With Config.Generator.UploadMethod set to "auto", the upload method is picked in this order:
R2,S3orRustFS, if its bucket convar is setFivemanage, if it has an API keyLocal
| Upload method | Convars |
|---|---|
Local | None. The images are saved in lb-appearance/uploads |
Fivemanage | FIVEMANAGE_MEDIA_API_KEY |
S3 | LB_S3_BUCKET, LB_S3_REGION, LB_S3_ACCESS_KEY_ID, LB_S3_SECRET_ACCESS_KEY |
R2 | LB_R2_BUCKET, LB_R2_ACCOUNT_ID, LB_R2_ACCESS_KEY_ID, LB_R2_SECRET_ACCESS_KEY |
RustFS | LB_RUSTFS_BUCKET, LB_RUSTFS_ENDPOINT, LB_RUSTFS_ACCESS_KEY_ID, LB_RUSTFS_SECRET_ACCESS_KEY |
Use set, not setr, so that the credentials stay on the server.
Localis only for self-hosted servers, since the game uploads the images straight to the server it’s connected to.- To give the generator its own Fivemanage key, set
LB_APPEARANCE_GENERATOR_FIVEMANAGE_KEY. - The images are uploaded from the game, so the bucket’s CORS needs to allow
POST(S3 & RustFS), orPUTwith theContent-Type,Authorization&X-Amz-*headers (R2).
Owned clothes
Config.OwnedClothes.Mode sets how players own the clothes they buy in clothing & mask stores.
| Mode | How it works |
|---|---|
"item" | Every piece bought is an inventory item. Carrying it makes the piece free in stores, and using it puts it on |
"database" | Pieces bought once stay free. Each texture is bought separately |
false | Players pay every time they change clothes |
The "item" mode uses the items in Config.OwnedClothes.Items. Categories without an item are paid for every time.
Clothing items
If you set Config.OwnedClothes.Mode to "item", you need to add the items in Config.OwnedClothes.Items to your inventory: mask, gloves, pants, bag, shoes, accessory, undershirt, kevlar, decal, top, hat, glasses, earrings, watch and bracelet.
The items need an inventory with item metadata, so the "item" mode doesn’t work with the default ESX inventory. The items mustn’t be used up, and qb-inventory needs them to be unique.
ox_inventory
Add the following to ox_inventory/data/items.lua:
["mask"] = { label = "Mask", weight = 100, consume = 0 },
["gloves"] = { label = "Gloves", weight = 100, consume = 0 },
["pants"] = { label = "Pants", weight = 100, consume = 0 },
["bag"] = { label = "Bag", weight = 100, consume = 0 },
["shoes"] = { label = "Shoes", weight = 100, consume = 0 },
["accessory"] = { label = "Accessory", weight = 100, consume = 0 },
["undershirt"] = { label = "Undershirt", weight = 100, consume = 0 },
["kevlar"] = { label = "Body armor", weight = 100, consume = 0 },
["decal"] = { label = "Decal", weight = 100, consume = 0 },
["top"] = { label = "Top", weight = 100, consume = 0 },
["hat"] = { label = "Hat", weight = 100, consume = 0 },
["glasses"] = { label = "Glasses", weight = 100, consume = 0 },
["earrings"] = { label = "Earrings", weight = 100, consume = 0 },
["watch"] = { label = "Watch", weight = 100, consume = 0 },
["bracelet"] = { label = "Bracelet", weight = 100, consume = 0 },qb-inventory
Add the following to qb-core/shared/items.lua:
mask = { name = 'mask', label = 'Mask', weight = 100, type = 'item', image = 'mask.png', unique = true, useable = true, shouldClose = true, description = '' },
gloves = { name = 'gloves', label = 'Gloves', weight = 100, type = 'item', image = 'gloves.png', unique = true, useable = true, shouldClose = true, description = '' },
pants = { name = 'pants', label = 'Pants', weight = 100, type = 'item', image = 'pants.png', unique = true, useable = true, shouldClose = true, description = '' },
bag = { name = 'bag', label = 'Bag', weight = 100, type = 'item', image = 'bag.png', unique = true, useable = true, shouldClose = true, description = '' },
shoes = { name = 'shoes', label = 'Shoes', weight = 100, type = 'item', image = 'shoes.png', unique = true, useable = true, shouldClose = true, description = '' },
accessory = { name = 'accessory', label = 'Accessory', weight = 100, type = 'item', image = 'accessory.png', unique = true, useable = true, shouldClose = true, description = '' },
undershirt = { name = 'undershirt', label = 'Undershirt', weight = 100, type = 'item', image = 'undershirt.png', unique = true, useable = true, shouldClose = true, description = '' },
kevlar = { name = 'kevlar', label = 'Body armor', weight = 100, type = 'item', image = 'kevlar.png', unique = true, useable = true, shouldClose = true, description = '' },
decal = { name = 'decal', label = 'Decal', weight = 100, type = 'item', image = 'decal.png', unique = true, useable = true, shouldClose = true, description = '' },
top = { name = 'top', label = 'Top', weight = 100, type = 'item', image = 'top.png', unique = true, useable = true, shouldClose = true, description = '' },
hat = { name = 'hat', label = 'Hat', weight = 100, type = 'item', image = 'hat.png', unique = true, useable = true, shouldClose = true, description = '' },
glasses = { name = 'glasses', label = 'Glasses', weight = 100, type = 'item', image = 'glasses.png', unique = true, useable = true, shouldClose = true, description = '' },
earrings = { name = 'earrings', label = 'Earrings', weight = 100, type = 'item', image = 'earrings.png', unique = true, useable = true, shouldClose = true, description = '' },
watch = { name = 'watch', label = 'Watch', weight = 100, type = 'item', image = 'watch.png', unique = true, useable = true, shouldClose = true, description = '' },
bracelet = { name = 'bracelet', label = 'Bracelet', weight = 100, type = 'item', image = 'bracelet.png', unique = true, useable = true, shouldClose = true, description = '' },Taking off clothes
Config.Underwearis what players wear with their clothes off, for categories that have no “none” item in the admin menu.- In
Config.ClothingAnimations, the clothes change halfway through theduration. An animation withfullBodystops the player while it plays, and isn’t played in vehicles. - With
Config.BikeHelmet, players get the helmet they’ve taken off with the hat command, or else the one they bought last.Config.OwnedClothes.Mode = falsedoesn’t track purchases, so only helmets that were taken off count.
Outfit bags
An outfit bag carries one outfit in its item metadata. Using it swaps what the player is wearing with what’s inside: an empty bag takes their clothes off, and a full bag puts its outfit on and packs the clothes they had on.
Outfit bags need an inventory with item metadata, so they don’t work with the default ESX inventory. Neither item may be used up, and Config.OutfitBags.Item mustn’t stack:
- ox_inventory: set
consume = 0on both items, andstack = falseonConfig.OutfitBags.Item - qb-inventory: set
unique = trueonConfig.OutfitBags.Item
See Installation for the items to add.
- With
Config.OutfitBags.AskForName, a swap clears the name. ox_inventory shows the name as the item’s name, other inventories at the top of its description. - The pieces in
Config.OutfitBags.Piecesare named like inConfig.Commands.Clothing. - The clothes change halfway through the
durationofConfig.OutfitBags.Animation.
Nail designs
Players can design their own nails with paint, images, text and gradients. The designs are uploaded with Config.UploadMethod.
Deleted designs
Designs that are no longer used are automatically deleted. This only works with the following upload methods:
FivemanageQbox, if “Allow this API key to delete files” is turned on for the keyLBPresigned- Custom methods with a
deleteoption. Seelb-appearance/server/upload.luafor which files are deleted
Image hosts
Config.NailDesigns.ImageWhitelistedHostnames and Config.NailDesigns.ImageWhitelistedDomains are the hosts nail design images can be loaded from. Every nearby player loads them, so keep this to your upload method’s image host. Designs on other hosts aren’t saved.
With Config.NailDesigns.AllowExternal, players can import images from links into their designs. The image becomes part of the design, which is uploaded like any other design.
Menu
Config.HideEntitiesonly hides entities for the player who has the menu open. Other players still see them.- The names of the colors in
Config.Colors.Paletteare shown asCATALOG.COLORS.<NAME>fromlb-appearance/config/locales.