Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (86,142 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

Amey.Banaye

Changing Ped clothes and attaching Props to Ped via Scripts.

Recommended Posts

Amey.Banaye

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

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!
Edited by Amey.Banaye

Share this post


Link to post
Share on other sites
Prof_Farnsworth

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.

Share this post


Link to post
Share on other sites
GeorgeZhang

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

Share this post


Link to post
Share on other sites
nordi

 

 

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

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 ?

Share this post


Link to post
Share on other sites
Amey.Banaye

 

 

 

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

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

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)

Share this post


Link to post
Share on other sites
ghost30812

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

 

I cant get it working :C

Share this post


Link to post
Share on other sites
WpgnGaming

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)  --sunglassesSetPedPropIndex(GetPlayerPed(-1), 2, 0, 0, 2)   --BluetoohSetPedComponentVariation(GetPlayerPed(-1), 11, 55, 0, 2)  -- Shirt with no tieSetPedComponentVariation(GetPlayerPed(-1), 8, 58, 0, 2)   --Nightstick decorationSetPedComponentVariation(GetPlayerPed(-1), 4, 35, 0, 2)   --PantsSetPedComponentVariation(GetPlayerPed(-1), 6, 24, 0, 2)   --Shoes

thanks all

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.