Skip to main content

Player::setDecoration

Client-side function

JavaScript​

This function applies an item from a PedDecorationCollection to a player, such as tattoos or shirt decals.

Required Params​

  • collection: number — the hash of the PedDecorationCollection, e.g., mp.game.joaat('mpbeach_overlays')
  • overlay: number — the hash of the item to apply from the collection, e.g., mp.game.joaat('fm_hair_fuzz')

Return value​

  • Undefined

Syntax​

mp.players.local.setDecoration(collection, overlay);

Example​

// Applies a head tattoo to the player
mp.players.local.setDecoration(mp.game.joaat('mpbeach_overlays'), mp.game.joaat('fm_hair_fuzz'));

Common PedDecorationCollections​

  • mpbeach_overlays
  • mpbusiness_overlays
  • mphipster_overlays
  • mplowrider_overlays
  • mpbiker_overlays