Skip to Content
AppearanceConfiguration

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:

  1. LBPresigned, if lb-presigned  is started before lb-appearance
  2. Fivemanage, if FIVEMANAGE_MEDIA_API_KEY is set
  3. Qbox, if QBOX_CDN_API_KEY is set

API keys are set with convars in your server.cfg. Use set, not setr, so that the key stays on the server.

Upload methodConvar
FivemanageFIVEMANAGE_MEDIA_API_KEY
QboxQBOX_CDN_API_KEY
LBPresignedlb-presigned’s own convars. Needs lb-presigned 1.1.0 or newer
CustomLB_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:

  1. R2, S3 or RustFS, if its bucket convar is set
  2. Fivemanage, if it has an API key
  3. Local
Upload methodConvars
LocalNone. The images are saved in lb-appearance/uploads
FivemanageFIVEMANAGE_MEDIA_API_KEY
S3LB_S3_BUCKET, LB_S3_REGION, LB_S3_ACCESS_KEY_ID, LB_S3_SECRET_ACCESS_KEY
R2LB_R2_BUCKET, LB_R2_ACCOUNT_ID, LB_R2_ACCESS_KEY_ID, LB_R2_SECRET_ACCESS_KEY
RustFSLB_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.

  • Local is 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), or PUT with the Content-Type, Authorization & X-Amz-* headers (R2).

Owned clothes

Config.OwnedClothes.Mode sets how players own the clothes they buy in clothing & mask stores.

ModeHow 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
falsePlayers 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.Underwear is 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 the duration. An animation with fullBody stops 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 = false doesn’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 = 0 on both items, and stack = false on Config.OutfitBags.Item
  • qb-inventory: set unique = true on Config.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.Pieces are named like in Config.Commands.Clothing.
  • The clothes change halfway through the duration of Config.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:

  • Fivemanage
  • Qbox, if “Allow this API key to delete files” is turned on for the key
  • LBPresigned
  • Custom methods with a delete option. See lb-appearance/server/upload.lua for 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.

  • Config.HideEntities only hides entities for the player who has the menu open. Other players still see them.
  • The names of the colors in Config.Colors.Palette are shown as CATALOG.COLORS.<NAME> from lb-appearance/config/locales.