This section lists all available commands, exports, and events included in the script. You’ll find client-side, server-side, and shared functions designed to help developers integrate, extend, or interact with the system easily within their own scripts or frameworks.
This section lists all available commands included in the script. Each command is designed to simplify administration, player interaction, or debugging tasks. You’ll find detailed descriptions, usage examples, and permission requirements to help you manage and customize your server efficiently.
Command
Description
/save-images
The new clothing photography engine starts.
/test_cam_saver [component] [componentId]
Test the camera saver.
/create_shop
Create clothing stores, barbershops, tattoo parlors, or surgeons in-game.
/delete_shop
Delete a shop (this must be created in-game, not in config)
/appearance
It will open the customization menu (administrative)
/reloadskin
It will refresh your player skin.
/clearstuckprops
Will fix if a prop breaks on your player (situational)
/migrateskins
Migration command for qb-clothing, esx_skin, fivem-appearance
/migrateoutfits
Only compatible with servers that previously used illenium-appearance.
This section provides all available client exports for the script. These functions allow you to interact directly with the system from the client side, enabling custom features, UI interactions, and integrations with other resources. Each export includes a short description and usage example for easy implementation.
startPlayerCustomization
lua
RegisterCommand('customize', function()
local config = exports['qs-appearance']:GetDefaultConfig()
-- you can see what options of the config in qs-appearance/types.lua `Config` type
config.character = true -- this will enable character creation and make all the prices 0
config.enableExit = true -- this will enable the exit button in the customization menu
config.upper_body = true
config.componentConfig.gloves = false -- this will disable gloves in the upper body section
exports['qs-appearance']:startPlayerCustomization(function(appearance)
if appearance then
print('Player finished customizing.')
-- You can save the appearance here
else
print('Player cancelled customization.')
end
end, config)
end)
This export opens the character customization menu, freezes the player, and hides the HUD while the interface is active. The player can modify their appearance during this process, and once they finish or cancel the customization, the provided callback function is triggered.
getPedModel
lua
local ped = PlayerPedId()
local model = exports['qs-appearance']:getPedModel(ped)
print("Ped model:", model)
This export returns a string representing the model name associated with the given ped, such as "mp_m_freemode_01". The function automatically initializes internal mappings if they haven't been computed yet, ensuring consistent results across uses.
getPedComponents
lua
local ped = PlayerPedId()
local components = exports['qs-appearance']:getPedComponents(ped)
for i, comp in pairs(components) do
print("Component ID:", comp.component_id)
print("Drawable:", comp.drawable)
print("Texture:", comp.texture)
end
This export returns a table indexed by component slot containing the component ID, drawable index, and texture variation for each clothing part. Special cases such as arms (component_id 3) and gloves (component_id 99) are handled separately to ensure accurate appearance data.
getPedProps
lua
local ped = PlayerPedId()
local props = exports['qs-appearance']:getPedProps(ped)
for i, prop in pairs(props) do
print("Prop ID:", prop.prop_id)
print("Drawable:", prop.drawable)
print("Texture:", prop.texture)
end
This function returns a table containing the prop slot identifier, along with the drawable and texture variation for each prop. It iterates through all predefined prop slots to provide complete and accurate data for character customization or synchronization.
This export returns a table containing the parental shape and skin tone IDs along with their blend percentages used by the GTA V character creator system. It also provides combined shape and skin strings that represent the selected parents. This information is essential for accurately reproducing a character’s facial structure and skin tone on freemode peds.
getPedFaceFeatures
lua
local ped = PlayerPedId()
local faceFeatures = exports['qs-appearance']:getPedFaceFeatures(ped)
for feature, value in pairs(faceFeatures) do
print("Feature:", feature, "Value:", value)
end
This export returns a table where each key represents a face feature name and the value is a normalized float, usually between -1.0 and 1.0, representing the morph level of that feature. This data is used to accurately save and restore detailed facial customization across sessions or servers.
getPedHeadOverlays
lua
local ped = PlayerPedId()
local overlays = exports['qs-appearance']:getPedHeadOverlays(ped)
for name, data in pairs(overlays) do
print("Overlay:", name)
print("Style:", data.style)
print("Opacity:", data.opacity)
print("Color:", data.color)
print("Second Color:", data.secondColor)
end
This export returns a table where each key represents a head overlay such as beard, makeup, or blush. Each entry contains the selected style, opacity, and color values used by that overlay. If an overlay is not applied, the function normalizes the values to ensure consistent and safe saving, applying, or replicating of character overlays.
getPedHair
lua
local ped = PlayerPedId()
local hairData = exports['qs-appearance']:getPedHair(ped)
print("Hair Style:", hairData.style)
print("Hair Texture:", hairData.texture)
print("Hair Color:", hairData.color)
print("Highlight Color:", hairData.highlight)
This export returns a table containing the hair style index, the texture variation, and the primary and highlight color IDs. It allows the exact hairstyle and color configuration to be saved and reapplied accurately for any freemode ped customization.
getPedAppearance
lua
local ped = PlayerPedId()
local appearance = exports['qs-appearance']:getPedAppearance(ped)
print("Model:", appearance.model)
print("Eye Color:", appearance.eyeColor)
print("Total components:", #appearance.components)
This export returns a complete table representing the full visual state of a character. It includes the ped model, facial blend data, face features, head overlays, clothing components, props, hair configuration, active tattoos, and eye color. This data can be used to accurately save, load, or replicate a character’s appearance.
setPlayerModel
To change a player's model to freemode male or female, use:
This export loads and applies a ped model to the player. It ensures the model is requested and loaded, sets it using SetPlayerModel, and initializes default component variations and facial blend data for freemode characters. Tattoos are also reset during the process. If the model is applied successfully, the updated ped entity is returned; otherwise, the playerId is returned if the model was invalid.
This export applies facial blend data to a ped using the provided shape and skin parent IDs along with their mix ratios. It only runs if the ped model is a freemode ped, ensuring compatibility, and uses SetPedHeadBlendData to accurately define the character’s genetic appearance.
setPedFaceFeatures
lua
local ped = PlayerPedId()
local features = {
nose_width = 0.2,
jawline = -0.4,
cheekbone_height = 0.1,
-- Add the rest based on constants.FACE_FEATURES
}
exports['qs-appearance']:setPedFaceFeatures(ped, features)
This export applies facial feature values to a ped using a table where each key represents a predefined face feature and each value is a float between -1.0 and 1.0. The function iterates through all features and applies them using SetPedFaceFeature, allowing precise restoration or generation of facial structures.
setPedHeadOverlays
lua
local ped = PlayerPedId()
local overlays = {
beard = { style = 2, opacity = 0.8, color = 1, secondColor = 1 },
lipstick = { style = 5, opacity = 0.6, color = 2, secondColor = 0 },
-- Add other overlays as needed
}
exports['qs-appearance']:setPedHeadOverlays(ped, overlays)
This export applies head overlays to a ped using a table that defines the overlay style, opacity, and optional color values. It automatically determines the correct color type for each overlay and applies the changes to ensure the character’s appearance is restored or customized accurately.
setPedHair
To apply a hairstyle to a ped, use the following code:
lua
local ped = PlayerPedId()
local overlays = {
beard = { style = 2, opacity = 0.8, color = 1, secondColor = 1 },
lipstick = { style = 5, opacity = 0.6, color = 2, secondColor = 0 },
-- Add other overlays as needed
}
exports['qs-appearance']:setPedHeadOverlays(ped, overlays)
You may optionally provide tattoo data as a third argument:
This export applies a hairstyle to a ped using the provided style, texture, color, and highlight values. If the ped is a freemode character, the function can also reapply tattoos after the hair change to preserve the character’s full visual appearance.
setPedEyeColor
lua
local ped = PlayerPedId()
exports['qs-appearance']:setPedEyeColor(ped, 3) -- 3 = light blue (example)
This export applies an eye color to a ped using the provided eye color index. It uses SetPedEyeColor internally and allows precise control over the character’s eye color as part of the full appearance customization system.
This export applies a clothing component to a ped using the provided slot ID, drawable, and texture values. It skips face and hair components for freemode peds, since those are handled separately. When applying jackets, it also adjusts the arms automatically to maintain proper torso compatibility. The variation is applied using SetPedComponentVariation, and special internal cases such as gloves are handled to ensure correct visual results.
setPedComponents
lua
local ped = PlayerPedId()
local appearance = exports['qs-appearance']:getPedAppearance(ped)
print("Model:", appearance.model)
print("Eye Color:", appearance.eyeColor)
print("Total components:", #appearance.components)
This export returns a complete table representing the full visual state of a character. It includes the ped model, facial blend data, face features, head overlays, clothing components, props, hair configuration, active tattoos, and eye color. This data can be used to accurately save, load, or replicate a character’s appearance.
This export applies multiple clothing components to a ped using a table that defines the slot ID, drawable variation, and texture for each item. Each entry is processed through the internal component handler to ensure proper torso adjustments and compatibility with freemode models, making it ideal for applying full outfits or restoring saved appearances.
setPedProp
To apply a prop to a ped, use the following code:
lua
local ped = PlayerPedId()
local prop = {
prop_id = 0, -- Hat slot
drawable = 5, -- Hat model index
texture = 0 -- Texture variation
}
exports['qs-appearance']:setPedProp(ped, prop)
To remove a prop, pass a drawable value of -1 or 6363:
This export returns a complete table representing the full visual state of a character. It includes the ped model, facial blend data, face features, head overlays, clothing components, props, hair configuration, active tattoos, and eye color. This data can be used to accurately save, load, or replicate a character’s appearance.
This export applies accessory props to a ped using a table that defines the prop slot, drawable variation, and texture. If the drawable value indicates removal, the prop is cleared from that slot. It processes each entry to accurately restore or update accessories such as hats or glasses during character loading or outfit changes.
This export applies a full character appearance using a table structured like the output of getPedAppearance. It first sets the ped model and then applies the rest of the appearance data, including facial blend, features, overlays, clothing, and accessories, making it ideal for restoring characters after selection, respawn, or database loading.
setPedAppearance
lua
local ped = PlayerPedId()
local appearance = exports['qs-appearance']:getPedAppearance(ped)
-- Later, restore the same appearance:
exports['qs-appearance']:setPedAppearance(ped, appearance)
This export applies a full appearance to a ped using a table containing clothing components, props, facial blend data, face features, head overlays, hair settings, eye color, and optional tattoos. Clothing and props are applied directly, while other attributes are applied only if present. It also verifies that the ped is a freemode model before applying facial blend data, ensuring safe and accurate restoration of detailed character appearances.
getPedAppearance
lua
local ped = PlayerPedId()
local tattoos = {
{ collection = "mpbusiness_overlays", name = "MP_Buis_Face_01_M" },
{ collection = "mpchristmas2_overlays", name = "MP_Xmas2_M_Tat_005" }
}
exports['qs-appearance']:setPedTattoos(ped, tattoos)
This export applies tattoos to a ped using a table that defines the tattoo collection and overlay name. The tattoos are stored internally for reuse and then applied to the ped, ensuring they remain consistent even after changes such as hairstyle or model updates.
getPedAppearance
lua
local ped = PlayerPedId()
local appearance = exports['qs-appearance']:getPedAppearance(ped)
print("Model:", appearance.model)
print("Eye Color:", appearance.eyeColor)
print("Total components:", #appearance.components)
This export returns a complete table representing the full visual state of a character. It includes the ped model, facial blend data, face features, head overlays, clothing components, props, hair configuration, active tattoos, and eye color. This data can be used to accurately save, load, or replicate a character’s appearance.
getPedAppearance
lua
local ped = PlayerPedId()
local appearance = exports['qs-appearance']:getPedAppearance(ped)
print("Model:", appearance.model)
print("Eye Color:", appearance.eyeColor)
print("Total components:", #appearance.components)
This export returns a complete table representing the full visual state of a character. It includes the ped model, facial blend data, face features, head overlays, clothing components, props, hair configuration, active tattoos, and eye color. This data can be used to accurately save, load, or replicate a character’s appearance.
getPedAppearance
lua
local ped = PlayerPedId()
local appearance = exports['qs-appearance']:getPedAppearance(ped)
print("Model:", appearance.model)
print("Eye Color:", appearance.eyeColor)
print("Total components:", #appearance.components)
This export returns a complete table representing the full visual state of a character. It includes the ped model, facial blend data, face features, head overlays, clothing components, props, hair configuration, active tattoos, and eye color. This data can be used to accurately save, load, or replicate a character’s appearance.
getPedAppearance
lua
local ped = PlayerPedId()
local appearance = exports['qs-appearance']:getPedAppearance(ped)
print("Model:", appearance.model)
print("Eye Color:", appearance.eyeColor)
print("Total components:", #appearance.components)
This export returns a complete table representing the full visual state of a character. It includes the ped model, facial blend data, face features, head overlays, clothing components, props, hair configuration, active tattoos, and eye color. This data can be used to accurately save, load, or replicate a character’s appearance.