Exports

Every export of the appearance script, with its arguments, return value and an example

11 min read ยท Updated Dec 3, 2026

Customization

startPlayerCustomization

Opens the customization window with the parts you choose.

Side: Client

Arguments

NameTypeRequiredDescription
callbackfunctionYesCalled with the new appearance table when the player saves, or nil when they cancel.
configtableYesWhich parts are shown, see below.

Returns

Nothing.

How to use it

lua
exports['illenium-appearance']:startPlayerCustomization(function(appearance)
    if appearance then
        TriggerServerEvent('illenium-appearance:server:saveAppearance', appearance)
    end
end, {
    ped = false,
    headBlend = false,
    faceFeatures = false,
    headOverlays = true,
    components = true,
    componentConfig = { masks = true, upperBody = true, lowerBody = true, bags = true, shoes = true,
                        scarfAndChains = true, bodyArmor = true, shirts = true, decals = true, jackets = true },
    props = true,
    propConfig = { hats = true, glasses = true, ear = true, watches = true, bracelets = true },
    tattoos = false,
    enableExit = true,
})

Good to know

  • Nothing is charged or saved by itself: save in the callback, as in the example.
  • enableExit = false makes the player finish before leaving.

Fields of config

FieldTypeDescription
pedbooleanModel selection
headBlendbooleanParents and skin
faceFeaturesbooleanFace sliders
headOverlaysbooleanHair, beard, make up
componentsbooleanClothes
componentConfigtableWhich clothes: masks, upperBody, lowerBody, bags, shoes, scarfAndChains, bodyArmor, shirts, decals, jackets
propsbooleanAccessories
propConfigtableWhich accessories: hats, glasses, ear, watches, bracelets
tattoosbooleanTattoos
enableExitbooleanThe player can leave without saving

Reading the look

getPedModel

Reads the model name of a ped.

Side: Client

Arguments

NameTypeRequiredDescription
pednumberYesPed entity, for the local player PlayerPedId().

Returns

string: for example mp_m_freemode_01. nil when the model is not in the ped list of the config.

How to use it

lua
local model = exports['illenium-appearance']:getPedModel(PlayerPedId())

getPedComponents

Reads the clothing components.

Side: Client

Arguments

NameTypeRequiredDescription
pednumberYesPed entity, for the local player PlayerPedId().

Returns

table: a list of { component_id, drawable, texture } for the components 0 to 11.

How to use it

lua
for _, part in ipairs(exports['illenium-appearance']:getPedComponents(PlayerPedId())) do
    print(part.component_id, part.drawable, part.texture)
end

getPedProps

Reads the props (hat, glasses, ear, watch, bracelet).

Side: Client

Arguments

NameTypeRequiredDescription
pednumberYesPed entity, for the local player PlayerPedId().

Returns

table: a list of { prop_id, drawable, texture } for the props 0, 1, 2, 6 and 7. drawable is -1 when nothing is worn.

How to use it

lua
local props = exports['illenium-appearance']:getPedProps(PlayerPedId())

getPedHeadBlend

Reads the parents and face mix.

Side: Client

Arguments

NameTypeRequiredDescription
pednumberYesPed entity, for the local player PlayerPedId().

Returns

table: { shapeFirst, shapeSecond, shapeThird, skinFirst, skinSecond, skinThird, shapeMix, skinMix, thirdMix }.

How to use it

lua
local blend = exports['illenium-appearance']:getPedHeadBlend(PlayerPedId())

getPedFaceFeatures

Reads the face sliders.

Side: Client

Arguments

NameTypeRequiredDescription
pednumberYesPed entity, for the local player PlayerPedId().

Returns

table: the 20 features by name (noseWidth, eyesOpening, jawBoneWidth, ...), each a number with one decimal.

How to use it

lua
local features = exports['illenium-appearance']:getPedFaceFeatures(PlayerPedId())
print(features.noseWidth)

getPedHeadOverlays

Reads beard, eyebrows, make up and the other overlays.

Side: Client

Arguments

NameTypeRequiredDescription
pednumberYesPed entity, for the local player PlayerPedId().

Returns

table: by name (blemishes, beard, eyebrows, ageing, makeUp, blush, complexion, sunDamage, lipstick, moleAndFreckles, chestHair, bodyBlemishes), each { style, opacity, color, secondColor }.

How to use it

lua
local overlays = exports['illenium-appearance']:getPedHeadOverlays(PlayerPedId())
print(overlays.beard.style)

getPedHair

Reads the hair.

Side: Client

Arguments

NameTypeRequiredDescription
pednumberYesPed entity, for the local player PlayerPedId().

Returns

table: { style, color, highlight, texture }.

How to use it

lua
local hair = exports['illenium-appearance']:getPedHair(PlayerPedId())

getPedAppearance

Reads the whole look, ready to be saved.

Side: Client

Arguments

NameTypeRequiredDescription
pednumberYesPed entity, for the local player PlayerPedId().

Returns

table: { model, headBlend, faceFeatures, headOverlays, components, props, hair, tattoos, eyeColor }.

How to use it

lua
local appearance = exports['illenium-appearance']:getPedAppearance(PlayerPedId())

Good to know

  • tattoos are those of the local player, whatever ped you pass.

Changing the look

These change what is on screen only. Nothing is saved to the database.

setPlayerModel

Changes the model of the local player.

Side: Client

Arguments

NameTypeRequiredDescription
modelstring or numberYesModel name or hash.

Returns

number: the new ped entity. When the model does not exist nothing changes.

How to use it

lua
local ped = exports['illenium-appearance']:setPlayerModel('mp_f_freemode_01')

Good to know

  • It waits for the model to load, call it from a thread. The old ped handle is no longer valid and the tattoo list is cleared.

setPedHeadBlend

Sets the parents and face mix.

Side: Client

Arguments

NameTypeRequiredDescription
pednumberYesPed entity, for the local player PlayerPedId().
headBlendtableYesThe table of getPedHeadBlend.

Returns

Nothing.

How to use it

lua
local ped = PlayerPedId()
local blend = exports['illenium-appearance']:getPedHeadBlend(ped)
blend.shapeMix = 0.5
exports['illenium-appearance']:setPedHeadBlend(ped, blend)

Good to know

  • Only freemode peds.

setPedFaceFeatures

Sets the face sliders.

Side: Client

Arguments

NameTypeRequiredDescription
pednumberYesPed entity, for the local player PlayerPedId().
faceFeaturestableYesAll 20 features, as returned by getPedFaceFeatures.

Returns

Nothing.

How to use it

lua
local ped = PlayerPedId()
local features = exports['illenium-appearance']:getPedFaceFeatures(ped)
features.noseWidth = 0.4
exports['illenium-appearance']:setPedFaceFeatures(ped, features)

Good to know

  • Send the full table, a missing feature is an error.

setPedHeadOverlays

Sets the overlays.

Side: Client

Arguments

NameTypeRequiredDescription
pednumberYesPed entity, for the local player PlayerPedId().
headOverlaystableYesAll 12 overlays, as returned by getPedHeadOverlays.

Returns

Nothing.

How to use it

lua
local ped = PlayerPedId()
local overlays = exports['illenium-appearance']:getPedHeadOverlays(ped)
overlays.beard = { style = 3, opacity = 1.0, color = 1, secondColor = 1 }
exports['illenium-appearance']:setPedHeadOverlays(ped, overlays)

Good to know

  • Send the full table, a missing overlay is an error.

setPedHair

Sets the hair.

Side: Client

Arguments

NameTypeRequiredDescription
pednumberYesPed entity, for the local player PlayerPedId().
hairtableYes{ style, color, highlight, texture }.
tattoostableNoTattoos to put back after the change, the current ones without it.

Returns

Nothing.

How to use it

lua
exports['illenium-appearance']:setPedHair(PlayerPedId(), { style = 5, texture = 0, color = 2, highlight = 4 })

setPedEyeColor

Sets the eye color.

Side: Client

Arguments

NameTypeRequiredDescription
pednumberYesPed entity, for the local player PlayerPedId().
eyeColornumberYesIndex from 0 to 31.

Returns

Nothing.

How to use it

lua
exports['illenium-appearance']:setPedEyeColor(PlayerPedId(), 3)

setPedComponent

Sets one clothing component.

Side: Client

Arguments

NameTypeRequiredDescription
pednumberYesPed entity, for the local player PlayerPedId().
componenttableYes{ component_id, drawable, texture }.

Returns

Nothing.

How to use it

lua
exports['illenium-appearance']:setPedComponent(PlayerPedId(), { component_id = 11, drawable = 15, texture = 0 })

Good to know

  • On freemode peds the components 0 (face) and 2 (hair) are ignored.

setPedComponents

Sets several clothing components.

Side: Client

Arguments

NameTypeRequiredDescription
pednumberYesPed entity, for the local player PlayerPedId().
componentstableYesA list of { component_id, drawable, texture }.

Returns

Nothing.

How to use it

lua
exports['illenium-appearance']:setPedComponents(PlayerPedId(), {
    { component_id = 8, drawable = 15, texture = 0 },
    { component_id = 11, drawable = 15, texture = 0 },
})

setPedProp

Sets or removes one prop.

Side: Client

Arguments

NameTypeRequiredDescription
pednumberYesPed entity, for the local player PlayerPedId().
proptableYes{ prop_id, drawable, texture }. drawable = -1 removes it.

Returns

Nothing.

How to use it

lua
exports['illenium-appearance']:setPedProp(PlayerPedId(), { prop_id = 0, drawable = -1, texture = 0 })

setPedProps

Sets several props.

Side: Client

Arguments

NameTypeRequiredDescription
pednumberYesPed entity, for the local player PlayerPedId().
propstableYesA list of { prop_id, drawable, texture }.

Returns

Nothing.

How to use it

lua
exports['illenium-appearance']:setPedProps(PlayerPedId(), savedProps)

setPedTattoos

Replaces the tattoos.

Side: Client

Arguments

NameTypeRequiredDescription
pednumberYesPed entity, for the local player PlayerPedId().
tattoostableYesLists of tattoos by zone, each { name, collection, hashMale, hashFemale, opacity }. {} removes all.

Returns

Nothing.

How to use it

lua
exports['illenium-appearance']:setPedTattoos(PlayerPedId(), {})

setPedAppearance

Applies a saved look to a ped, without changing its model.

Side: Client

Arguments

NameTypeRequiredDescription
pednumberYesPed entity, for the local player PlayerPedId().
appearancetableYesThe table of getPedAppearance. Missing parts are left as they are.

Returns

Nothing.

How to use it

lua
exports['illenium-appearance']:setPedAppearance(PlayerPedId(), appearance)

setPlayerAppearance

Changes the model of the local player and applies the whole look.

Side: Client

Arguments

NameTypeRequiredDescription
appearancetableYesThe table of getPedAppearance, with model.

Returns

Nothing.

How to use it

lua
-- try a look on for ten seconds
local before = exports['illenium-appearance']:getPedAppearance(PlayerPedId())
exports['illenium-appearance']:setPlayerAppearance(preset)
Wait(10000)
exports['illenium-appearance']:setPlayerAppearance(before)

Good to know

  • It waits for the model to load, call it from a thread.

Old skinchanger exports (ESX)

On ESX the script answers the exports of skinchanger, so scripts written for it keep working. You do not need to change them. Use the exports above in new code.

GetSkin

Reads the saved appearance of the player.

Side: Client (ESX)

Arguments

None.

Returns

table: the saved appearance.

How to use it

lua
local skin = exports.skinchanger:GetSkin()

LoadSkin

Applies an appearance.

Side: Client (ESX)

Arguments

NameTypeRequiredDescription
skintableYesAn appearance with model. Without model the starting clothes are put on.

Returns

Nothing.

How to use it

lua
exports.skinchanger:LoadSkin(skin)

LoadClothes

Puts clothes in the old skinchanger format on the player.

Side: Client (ESX)

Arguments

NameTypeRequiredDescription
playerSkintableYesNot read.
clothesSkintableYesClothes in the skinchanger format (tshirt_1, torso_1, ...).

Returns

Nothing.

How to use it

lua
exports.skinchanger:LoadClothes(skin, { tshirt_1 = 15, tshirt_2 = 0 })