I wanted to change Ped's clothes to a certain outfit. So i did some research on it, and here's what i found out.
First of let's look at function to change the clothes.
void SET_PED_COMPONENT_VARIATION(Ped ped, int componentId, int drawableId, int textureId, int paletteId)
Ped - is the ped you want to set the outfit.
ComponentId - Is the ID of the part of the body.
DrawableID - Is the ID of the cloth you want to set.
TextureID - Is the ID of the variation of the cloth. (Variation in the sense of color)
PalleteID - Can be set as 2 or you use (int GET_PED_PALETTE_VARIATION(Ped ped, int componentId))
5 Hands / Gloves
9 Mission Items/Tasks
11 Collars and Inner Shirts
TextureIds are defined as a...b..c..d
So for ease use this
a=0 b=1 c=2 d=3 e=4 f=5 g=6 h=7 i=8 j=9 k=10 l=11 m=12 n=13 o=14 p=15 q=16 r=17 s=18 t=19 u=20 v=21 w=22 x=23 y=24 z=25
Make a point that each ped has a different set of clothes variations which can be found at.
Grand Theft Auto V\x64v.rpf\models\cdimages\
Now let's look at an example
Let say we want to change the shirt of Michael.
We can find the variations for Michael at
Grand Theft Auto V\x64v.rpf\models\cdimages\streamedpeds_players.rpf\player_zero
Now let's take a look at a Shirt Texture .
Now this has 3 parts :-
uppr_diff = Stands for Shirt/T Shirt
000 = Stands for the Shirt/T Shirt Texture or Type.
a = Stands for the color variation.
For setting this as a current shirt for Michael use
SET_PED_COMPONENT_VARIATION(player, 3, 0, 0, 2) ;
Now for setting Props.
Props are Helmets, bluetooth earsets , sunglasses, headphones etc.
For setting Props to Ped use this
void SET_PED_PROP_INDEX(Ped ped, int componentId, int drawableId, int TextureId, int paletteId)
Ped is the Ped you want to set prop for
Component ID is the Part of the head.
Drawable ID is the component you want to set (Sunglasses,Different types of helmet Helmets,etc)
Texture ID is the variations for the component (Like color)
PaletteID can be set as 2 or use (int GET_PED_PALETTE_VARIATION(Ped ped, int componentId))
Prop Component IDs
0 = Head Props
1 = Eye Props
2 = Ear Props
Make a point that each ped has a different set of Prop variations which can be found at.
Grand Theft Auto V\x64v.rpf\models\cdimages\streamedpedsprops.rpf
Let's look at a helmet Prop .
Now this has 3 parts :-
head_diff = Stands for Props that can be wore as a hat or headphone.Basically on the head
000 = Stands for the Helmet/ Headphone Texture or Type.
e = Stands for the color variation.
SET_PED_PROP_INDEX(player, 0, 0, 4,2);