Documentation

Exports

Clientside Exports

startPlayerCustomization(callback, config)

Starts the player customization process, allowing players to modify their appearance. The callback is triggered once customization is complete, returning appearance data or nil if canceled.

---@param callback function Receives `appearance` data if saved or `nil` if canceled
---@param config table Configuration for customization options
exports['illenium-appearance']:startPlayerCustomization(function(appearance)
    if appearance then
        print('Customization saved!')
    else
        print('Customization canceled.')
    end
end, {
    ped = true,
    headBlend = true,
    faceFeatures = true,
    headOverlays = true,
    components = true,
    props = true,
    allowExit = true,
    tattoos = true
})

getPedModel(ped)

Retrieves the model name associated with a player's entity.

---@param ped number Entity ID of the pedestrian
---@return string Model name
local pedModel = exports['illenium-appearance']:getPedModel(ped)
print(pedModel)  -- e.g. "mp_m_freemode_01"

getPedComponents(ped)

Retrieves the clothing and accessory components of a pedestrian's model.

---@param ped number Entity ID
---@return table Components data
local components = exports['illenium-appearance']:getPedComponents(ped)
print(components[1].drawable)

getPedProps(ped)

Retrieves the props (hats, glasses, etc.) for a pedestrian.

---@param ped number Entity ID
---@return table Props data
local props = exports['illenium-appearance']:getPedProps(ped)
print(props[1].prop_id)

getPedHeadBlend(ped)

Retrieves the head blend data (shape, skin mix, etc.) for a pedestrian.

---@param ped number Entity ID
---@return table Head blend data
local headBlend = exports['illenium-appearance']:getPedHeadBlend(ped)
print(headBlend.shapeFirst)

getPedFaceFeatures(ped)

Retrieves the face feature data (facial traits) for a pedestrian.

---@param ped number Entity ID
---@return table Face features
local faceFeatures = exports['illenium-appearance']:getPedFaceFeatures(ped)
print(faceFeatures['noseWidth'])

getPedHeadOverlays(ped)

Retrieves the head overlays (makeup, scars, etc.) for a pedestrian.

---@param ped number Entity ID
---@return table Head overlays
local headOverlays = exports['illenium-appearance']:getPedHeadOverlays(ped)
print(headOverlays['blush'].opacity)

getPedHair(ped)

Retrieves the hair data for a pedestrian, including style and color.

---@param ped number Entity ID
---@return table Hair data
local hair = exports['illenium-appearance']:getPedHair(ped)
print(hair.style)

getPedAppearance(ped)

Retrieves the full appearance object for a pedestrian.

---@param ped number Entity ID
---@return table Full appearance
local appearance = exports['illenium-appearance']:getPedAppearance(ped)
print(appearance.model)

setPlayerModel(model)

Sets the player’s model to the specified model.

---@param model string|number Model name or hash
---@return number Entity ID
local success = exports['illenium-appearance']:setPlayerModel("mp_f_freemode_01")
print(success)

setPedHeadBlend(ped, headBlend)

Sets the head blend data (shape, skin mix, etc.) for a pedestrian.

---@param ped number Entity ID
---@param headBlend table Head blend data
exports['illenium-appearance']:setPedHeadBlend(ped, {
    shapeFirst = 0, shapeSecond = 1, shapeThird = 2,
    skinFirst = 0, skinSecond = 1, skinThird = 2,
    shapeMix = 0.5, skinMix = 0.5, thirdMix = 0.5
})

setPedFaceFeatures(ped, faceFeatures)

Sets the face features for a pedestrian.

---@param ped number Entity ID
---@param faceFeatures table Face features data
exports['illenium-appearance']:setPedFaceFeatures(ped, {
    noseWidth = 0.8, cheekboneWidth = 0.5, chinLength = 0.7
})

setPedHeadOverlays(ped, headOverlays)

Sets the head overlays (makeup, scars, etc.) for a pedestrian.

---@param ped number Entity ID
---@param headOverlays table Head overlays data
exports['illenium-appearance']:setPedHeadOverlays(ped, {
    blush = {opacity = 0.5, color = 1},
    freckles = {opacity = 0.3, color = 2}
})

setPedHair(ped, hair)

Sets the hair data for a pedestrian, including style and color.

---@param ped number Entity ID
---@param hair table Hair data
exports['illenium-appearance']:setPedHair(ped, {
    style = 1, color = 0, highlight = 1, texture = 0
})

setPedAppearance(ped, appearance)

Sets the full appearance for a pedestrian, including model, head blend, and features.

---@param ped number Entity ID
---@param appearance table Full appearance data
exports['illenium-appearance']:setPedAppearance(ped, {
    model = "mp_f_freemode_01",
    headBlend = {
        shapeFirst = 0, shapeSecond = 1, shapeThird = 2,
        skinFirst = 0, skinSecond = 1, skinThird = 2,
        shapeMix = 0.5, skinMix = 0.5, thirdMix = 0.5
    },
    faceFeatures = {
        noseWidth = 0.8,
        cheekboneWidth = 0.5,
        chinLength = 0.7
    }
})

On this page