Player::setComponentVariation: Difference between revisions

From RAGE Multiplayer Wiki
(Added example and wiki link to clothes)
No edit summary
Line 1: Line 1:
paletteId/palletColor -  0 to 3. <br>enum PedVariationData<br>{<br> Player_VARIATION_FACE = 0,<br> Player_VARIATION_HEAD = 1,<br> Player_VARIATION_HAIR = 2,<br> Player_VARIATION_TORSO = 3,<br> Player_VARIATION_LEGS = 4,<br> Player_VARIATION_HANDS = 5,<br> Player_VARIATION_FEET = 6,<br> Player_VARIATION_EYES = 7,<br> Player_VARIATION_ACCESSORIES = 8,<br> Player_VARIATION_TASKS = 9,<br> Player_VARIATION_TEXTURES = 10,<br> Player_VARIATION_TORSO2 = 11<br>};<br>Usage: <br>SET_Player_COMPONENT_VARIATION(playerPed, Player_VARIATION_FACE, GET_NUMBER_OF_Player_DRAWABLE_VARIATIONS(playerPed, Player_VARIATION_FACE), GET_NUMBER_OF_Player_TEXTURE_VARIATIONS(playerPed, Player_VARIATION_FACE, 0), 2);<br><br>List of component/props ID<br>gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html<br><br>See player clothes: https://wiki.rage.mp/index.php?title=Clothes
{| class="wikitable"
 
| Component ID
| Part                 
|-
 
| 0
| Face   
|-
 
| 1
| Head
|-
 
| 2
| Hair 
|-
 
| 3
| Torso
|-
 
| 4
| Legs
|-
 
| 5
| Hands
|-
 
| 6
| Feet
|-
 
| 7
| Eyes
|-
 
| 8
| Accessories
|-
 
 
| 9
| Tasks
|-
 
 
| 10
| Textures
|-
 
 
| 11
| Torso2
|-
 
|}
List of component/props ID: http://gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
<br>See player clothes: https://wiki.rage.mp/index.php?title=Clothes
<br>paletteId/palletColor - 0 to 3.
 
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">player.setComponentVariation(componentId, drawableId, textureId, paletteId);</syntaxhighlight>
<syntaxhighlight lang="javascript">player.setComponentVariation(componentId, drawableId, textureId, paletteId);</syntaxhighlight>

Revision as of 11:20, 22 February 2020

Component ID Part
0 Face
1 Head
2 Hair
3 Torso
4 Legs
5 Hands
6 Feet
7 Eyes
8 Accessories
9 Tasks
10 Textures
11 Torso2

List of component/props ID: http://gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
See player clothes: https://wiki.rage.mp/index.php?title=Clothes
paletteId/palletColor - 0 to 3.

Syntax

player.setComponentVariation(componentId, drawableId, textureId, paletteId);

Required Arguments

  • componentId: int
  • drawableId: int
  • textureId: int
  • paletteId: int

Return value

  • Undefined

Example

// set shirt on player
 player.setComponentVariation(11, 4, 0, 2);

See also