setPedAppearance
The setPedAppearance
export allows you to apply a full appearance configuration to any ped entity. It handles everything from clothing and props to facial features, head overlays, tattoos, hair, and eye color. This export is ideal for restoring saved character data to an NPC or the player ped.
How to Use
To apply a full appearance to a ped, use the following code:
This export takes:
ped
: The ped entity to apply the appearance toappearance
: A table structured like the result ofgetPedAppearance
, containing:components
: Outfit components (e.g., jacket, pants)props
: Accessories (e.g., hat, glasses)headBlend
: Facial and skin blendingfaceFeatures
: Facial morphsheadOverlays
: Beards, makeup, blemishes, etc.hair
: Hair style and coloreyeColor
: Eye color indextattoos
: Tattoo list (optional)
Behavior:
Applies components and props unconditionally
Applies other features conditionally (only if they exist)
Includes logic to verify freemode models before applying
headBlend
This export is perfect for synchronizing or restoring detailed ped appearances, both for players and AI characters.
Last updated