Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (91,975 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

Sign in to follow this  


Recommended Posts




So i am trying to work out how to get the outfits into my menu

I have random outfit in but no clue on how the person can choose which outfit



Share this post

Link to post
Share on other sites

Its quite tedious to do, I'll try to explain but I haven't done this since a long time...


You'll mostly need to work with PED_COMPONENT_VARIATION.


It works like this (http://www.dev-c.com/nativedb/func/info/262b14f48d29de80):

void SET_PED_COMPONENT_VARIATION(Ped ped, int componentId, int drawableId, int textureId, int paletteId) // 0x262B14F48D29DE80 0xD4F7B05C

ped = you player's character

componentId = the part you want to change (Torso, hands, feets, ...)

drawableId = the ID of the clothe

textureId = the ID of the texture (most clothes have many textures, ie: a t-shirt can be green, red, with a decal, ...)

paletteId = I don't really know about this one, seems like it is related to the ped and not the clothes


Go to Native DB and check this function comment to have the list of component ID.


----- Example -----

You want to list every t-shirts.

We will use the ComponentID n°3 (PED_VARIATION_TORSO).



To get every drawable variations (= model) of this component, you use (http://www.dev-c.com/nativedb/func/info/27561561732a7842):

int GET_NUMBER_OF_PED_DRAWABLE_VARIATIONS(Ped ped, int componentId) // 0x27561561732A7842 0x9754C27D



Now, you will have the number of t-shirts models available for you character.

Let's say the function returned "5" and the player wants to chose the shirt model n°2.



You'll need to get the amount of textures this shirt has (http://www.dev-c.com/nativedb/func/info/8f7156a3142a6bad):

int GET_NUMBER_OF_PED_TEXTURE_VARIATIONS(Ped ped, int componentId, int drawableId) // 0x8F7156A3142A6BAD 0x83D9FBE7

PED::GET_NUMBER_OF_PED_TEXTURE_VARIATIONS(PlayerPed, 3, 2); // 3 = TORSO, 2 = Shirt model n°2


Now, you now how many different textures the shirt can have (let's say "10").

The player wants to use the texture n°6.



I'm not sure of this part...

The only missing part is now the palette ID (http://www.dev-c.com/nativedb/func/info/e3dd5f2a84b42281):

int GET_PED_PALETTE_VARIATION(Ped ped, int componentId) // 0xE3DD5F2A84B42281 0xEF1BC082


I think you should use this value directly in PED_COMPONENT_VARIATION (let's say it returned 0).


Make the character wear it

And only now, you can call the native that displays the shirt on the character:

PED::SET_PED_COMPONENT_VARIATION(PlayerPed, 3, 2, 6, 0) // 0x262B14F48D29DE80 0xD4F7B05C


The player should now see the beautiful shirt on his character!



About accessories

Hats, glasses, watches and some other accessories are usable with an other function:

void SET_PED_PROP_INDEX(Ped ped, int componentId, int drawableId, int TextureId, BOOL attach) // 0x93376B65A266EB5F 0x0829F2E2

attach = is the object attached to the character (true) or does it fall if he is punched (false)


You proceed the same way as other clothes (how many drawable variations, how many textures for each, etc.)




If you want to make the menu simpler at first (for debugging), you should let the player select the ID himself.

Like this:

TORSO  | - Drawable (select from 0 to GET_NUMBER_OF_PED_DRAWABLE_VARIATIONS)  | - Texture (select from 0 to GET_NUMBER_OF_PED_TEXTURE_VARIATIONS)  | - Palette (maybe try from 0 to GET_PED_PALETTE_VARIATION?)

You do this for every componentID.

And call SET_PED_COMPONENT_VARIATION at each modification, so you'll see what it does directly.




Hope this helped! :)

Share this post

Link to post
Share on other sites

Thank you very much Bob

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
Sign in to follow this  

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest


Important Information

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