Skip to Content

Exports

illenium-appearance exposes client-side exports for use in other resources.

Reading Appearance

-- Get the ped's full appearance table local appearance = exports["illenium-appearance"]:getPedAppearance(ped) -- Get specific sections local components = exports["illenium-appearance"]:getPedComponents(ped) local props = exports["illenium-appearance"]:getPedProps(ped) local headBlend = exports["illenium-appearance"]:getPedHeadBlend(ped) local faceFeatures = exports["illenium-appearance"]:getPedFaceFeatures(ped) local headOverlays = exports["illenium-appearance"]:getPedHeadOverlays(ped) local hair = exports["illenium-appearance"]:getPedHair(ped) local model = exports["illenium-appearance"]:getPedModel(ped)

Applying Appearance

-- Apply a full appearance (model + all sections) exports["illenium-appearance"]:setPlayerAppearance(appearance) -- Apply appearance to current ped (without model change) exports["illenium-appearance"]:setPedAppearance(ped, appearance) -- Apply individual sections exports["illenium-appearance"]:setPlayerModel(model) exports["illenium-appearance"]:setPedHeadBlend(ped, headBlend) exports["illenium-appearance"]:setPedFaceFeatures(ped, faceFeatures) exports["illenium-appearance"]:setPedHeadOverlays(ped, headOverlays) exports["illenium-appearance"]:setPedHair(ped, hair) exports["illenium-appearance"]:setPedEyeColor(ped, eyeColor) exports["illenium-appearance"]:setPedComponent(ped, component) exports["illenium-appearance"]:setPedComponents(ped, components) exports["illenium-appearance"]:setPedProp(ped, prop) exports["illenium-appearance"]:setPedProps(ped, props) exports["illenium-appearance"]:setPedTattoos(ped, tattoos)

Opening the Customization Menu

exports["illenium-appearance"]:startPlayerCustomization(function(appearance) if appearance then -- Player saved TriggerServerEvent("illenium-appearance:server:saveAppearance", appearance) else -- Player cancelled end end, config)

The config table controls which sections are visible:

local config = { ped = true, -- Ped model selector headBlend = true, -- Parent heritage faceFeatures = true, -- Face shape sliders headOverlays = true, -- Beard, hair, makeup, etc. components = true, -- Clothing components props = true, -- Hats, glasses, etc. tattoos = true, -- Tattoo editor enableExit = true, -- Show cancel button (default: true) }

Data Structures

Component

{ component_id = 3, -- GTA component ID (0-11) drawable = 15, -- Global drawable index texture = 0, -- Texture variation dlc_collection = hash, -- DLC collection hash (if DLC item) dlc_localIndex = 5, -- Local index within collection (if DLC item) }

Prop

{ prop_id = 0, -- GTA prop ID (0, 1, 2, 6, 7) drawable = 5, -- Global drawable index (-1 = none) texture = 0, dlc_collection = hash, dlc_localIndex = 2, }

Hair

{ style = 5, -- Hair drawable color = 0, -- Primary color highlight = 0, -- Highlight color texture = 0, -- Hair texture dlc_collection = hash, dlc_localIndex = 3, }

The dlc_collection and dlc_localIndex fields are automatically populated when reading from a ped and used when loading saved outfits. See DLC Support for details.

Last updated on