setPedComponents
The setPedComponents
export allows you to apply a full set of clothing components to a ped in a single operation. It loops through all provided components and applies them individually using the internal logic of setPedComponent
.
How to Use
To apply a full outfit to a ped, use the following code:
This export takes:
ped
: The ped entity to modifycomponents
: A table of component tables, where each entry includes:component_id
: Slot ID (e.g., torso, pants)drawable
: Variation indextexture
: Texture index
Each component is passed through the setPedComponent
function, ensuring proper handling of special cases (like torso adjustments) and freemode model validation. This export is ideal for applying full outfits or restoring saved appearances efficiently.
Last updated