setPedProps
The setPedProps
export allows you to apply a full set of accessories (props) to a ped at once. This includes items such as hats, glasses, earrings, and watches. It uses the internal setPedProp
function to handle each accessory safely and consistently.
How to Use
To apply multiple props to a ped, use the following code:
This export takes:
ped
: The ped entity to modifyprops
: A table of prop definitions, where each entry includes:prop_id
: Accessory slot ID (e.g.,0
for hats)drawable
: Variation index (-1
or6363
removes the prop)texture
: Texture variation (optional if removing)
It loops through each entry and applies or removes the prop as needed, making it ideal for restoring full accessory sets during character load or outfit switching.
Last updated