Quantcast

Jump to content

» «
Photo

Changing Ped clothes and attaching Props to Ped via Scripts.

6 replies to this topic
Amey.Banaye
  • Amey.Banaye

    BlackDragon

  • Members
  • Joined: 30 Dec 2013
  • India

#1

Posted 15 July 2015 - 03:15 PM Edited by Amey.Banaye, 15 July 2015 - 03:19 PM.

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) 

 Where

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))

 

ComponentID's

 

0 FACE
1 BEARD
2 HAIRCUT
3 SHIRT
4 PANTS
5 Hands / Gloves
6 SHOES
7 Eyes
8 Accessories
9 Mission Items/Tasks
10 Decals
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 .

uppr_diff_000_a

 

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) 

Where

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 pedint 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 .

p_head_diff_000_e

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.

 
For setting this Prop to ped use 
SET_PED_PROP_INDEX(player, 0, 0, 4,2); 
Hope This Helps! 
  • PatrickW, ffzero58, Prof_Farnsworth and 5 others like this

Prof_Farnsworth
  • Prof_Farnsworth

    Ambient Modder

  • Members
  • Joined: 25 Feb 2011

#2

Posted 23 July 2015 - 11:52 PM

I think you explained this TOO well, which is why no has replied. I'll leave a huge thank you, since this will be very helpful in the future for me.

  • Zerovv likes this

GeorgeZhang
  • GeorgeZhang

    I'm New

  • Members
  • Joined: 04 Jul 2015
  • None

#3

Posted 24 July 2015 - 05:00 PM

Thanks man! this is awesome, really helped me a lot:)


nordi
  • nordi

    Rat

  • Members
  • Joined: 17 Mar 2014
  • France

#4

Posted 20 August 2015 - 03:07 PM

 



rand Theft Auto4v.rpf\models\cdimage

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) 

Where

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 pedint 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 .

p_head_diff_000_e

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.

 
For setting this Prop to ped use 
SET_PED_PROP_INDEX(player, 0, 0, 4,2); 
Hope This Helps! 

 

 

 

I added a helmet prop to Franklin, but I can't remove it for some reason ... the native REMOVE_PLAYER_HELMET do not work ... any idea ?


Amey.Banaye
  • Amey.Banaye

    BlackDragon

  • Members
  • Joined: 30 Dec 2013
  • India

#5

Posted 06 September 2015 - 05:21 PM

 

 



rand Theft Auto4v.rpf\models\cdimage

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) 

Where

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 pedint 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 .

p_head_diff_000_e

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.

 
For setting this Prop to ped use 
SET_PED_PROP_INDEX(player, 0, 0, 4,2); 
Hope This Helps! 

 

 

 

I added a helmet prop to Franklin, but I can't remove it for some reason ... the native REMOVE_PLAYER_HELMET do not work ... any idea ?

 

 

 

 



rand Theft Auto4v.rpf\models\cdimage

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) 

Where

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 pedint 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 .

p_head_diff_000_e

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.

 
For setting this Prop to ped use 
SET_PED_PROP_INDEX(player, 0, 0, 4,2); 
Hope This Helps! 

 

 

 

I added a helmet prop to Franklin, but I can't remove it for some reason ... the native REMOVE_PLAYER_HELMET do not work ... any idea ?

 

I know its too late but have you tried ?

 

void CLEAR_PED_PROP(Ped ped, int propId)

void CLEAR_ALL_PED_PROPS(Ped ped)


ghost30812
  • ghost30812

    Matrix Menu Developer

  • Members
  • Joined: 26 Feb 2016
  • Germany

#6

Posted 24 March 2016 - 07:55 PM

How do i set something like jbib_diff_000_b_uni ? (located in dlc folder mpvalentines2) (male section)

 

I cant get it working :C

  • BrownRecluse likes this

WpgnGaming
  • WpgnGaming

    Player Hater

  • New Members
  • Joined: 14 Jul 2017
  • United-Kingdom

#7

Posted 14 July 2017 - 12:57 AM

Am wondering if you can help me am trying to kit my police chars out with the correct gear but am having a little trouble getting the right numbers for the cloths below is the police chest with tie but am unable to work it out

 

uppr_006_u_ydd

 

or if you know the correct codes to kid my char out that be good ha can anyone help plz?

 

using model: mp_m_freemode_01

SetPedPropIndex(GetPlayerPed(-1), 1, 5, 0, 2)  --sunglasses
SetPedPropIndex(GetPlayerPed(-1), 2, 0, 0, 2)   --Bluetooh
SetPedComponentVariation(GetPlayerPed(-1), 11, 55, 0, 2)  -- Shirt with no tie
SetPedComponentVariation(GetPlayerPed(-1), 8, 58, 0, 2)   --Nightstick decoration
SetPedComponentVariation(GetPlayerPed(-1), 4, 35, 0, 2)   --Pants
SetPedComponentVariation(GetPlayerPed(-1), 6, 24, 0, 2)   --Shoes

thanks all 





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users