ScriptsAboutBlogToolsKnowledge BaseReviewsFAQBasketDocsSupport
client

SetPedPropIndex

FiveM client native documentation with a Lua example.

Summary

Sets a ped prop (hats, glasses, ears, watches). Complements SetPedComponentVariation for accessories.

Returns

void

Parameters

pednumberThe ped.
componentIdnumberProp slot (0 = hat, 1 = glasses...).
drawableIdnumberThe prop index.
textureIdnumberThe texture index.
attachbooleanUsually true.

Example

SetPedPropIndex(PlayerPedId(), 0, 5, 0, true) -- a hat
ClearPedProp(PlayerPedId(), 0) -- remove hat

Common pitfalls

  • Use ClearPedProp to remove a prop (index -1 also works).
  • Prop indices are model-specific.

Related natives

Related guides

FiveM scripts done right

Optimized, dual-framework scripts for QBCore and ESX from Viper Development — escrow protected, delivered instantly to your Cfx portal.

Browse Scripts →