Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

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

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

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

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

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

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

    2. Forum Support

    3. Suggestions

Put Clothes in Wardrobe


Big_Mitch_Baker
 Share

Recommended Posts

Big_Mitch_Baker

I was wondering how to put individual articles of clothing into CJs wardrobe?

 

I've figured out how to add/remove special clothing like the racing suit, but I need to know how to tell the game that the player has already purchased other items (ie Biker boots, biker jacket, vest)

 

Keep in mind I already know how to add the clothes to the player, I need to know how to add those clothes to the wardrobe list mercie_blink.gif

 

Appreciate any help thanks

Link to comment
Share on other sites

The standard method for adding clothing to the inventory is to use opcode 0793: save_player_shopping_items. Here's an example that includes pdescobar's alternate string for adding the Zip Blue Shorts.

 

Player.SetClothes($PLAYER_CHAR, "timberfawn", "bask1", 3)
Player.SetClothes($PLAYER_CHAR, "hoodyamerc", "hoodya", 0)
Player.SetClothes($PLAYER_CHAR, "capblueover", "capovereye", 16)
//Shorts crash the game because name string too long, so we have to use another method.
//Player.SetClothes($PLAYER_CHAR, "cutoffchinosblue", "shorts", 2)
//PDE/CG24: Finally! The Zip Blue Shorts through mission-coding.
//KIALNSR has the same crc32 as CUTOFFCHINOSBLUE so this, finally, works.
Player.SetClothes($PLAYER_CHAR, "KIALNSR", "shorts", 2)
0793: save_player_shopping_items
 

If your goal is to add all clothing to the wardrobe so you don't need to go through the time consuming process of buying everything at the stores then this subroutine from the Chain Game customization mission might help you out.

 

 

//RBR/CG37: ------------------ All Clothes in Wardrobe ------------------------

:CG_AllClothes
// Flags for owned clothes are at mem addresses 0xa9734c to 0xa97442 - set 1 to own
// These 247 flags are presumably: 249  total clothes items (without the specials)
//                                -  3  default skins (default torso, legs, shoes)
//                                +  1  ski mask (listed as special; not available through wardrobe)

// these three lines by OrionSR surely beat my lengthy code
{
for [email protected] = 0xa9734c to 0xa97442 step 1
//  0001: wait 0 ms //OSR/CG37: causing lag 
  0A8C: write_memory [email protected] size 1 value 1 virtual_protect 0
end
}
//RBR/CG37: slightly reworked for better readability
//OSR/CG37: reworked to avoid waits in a for/end loop
0006: [email protected] = 0xA9734C  // start of shopping clothes data
:CG_AllClothes_SetFlags
00D6: if
002B:   0xA97442 >= [email protected] // end of shopping clothes data
004D: jump_if_false @CG_AllClothes_Specials
0A8C: write_memory [email protected] size 1 value 1 virtual_protect 0
000A: [email protected] += 1
0002: jump @CG_AllClothes_SetFlags

:CG_AllClothes_Specials
// Make all specials available
// Setting these globals seems to be enough. Ski Mask is not accessible through wardrobe.
0004: $Gimp_Suit_Available = 1
0004: $Valet_Uniform_Available = 1
0004: $Rural_Clothes_Available = 1
0004: $Croupier_Uniform_Available = 1
0004: $Cop_Uniform_Available = 1
0004: $Pimp_Suit_Available = 1
0004: $Racing_Suit_Available = 1
0004: $Medic_Uniform_Available = 1

// Make all stores selectable in wardrobe
0004: $2549 = 1   // Binco
0004: $2550 = 1   // Pro-Laps
0004: $2551 = 1   // Sub Urban
0004: $2552 = 1   // Zip
0004: $2553 = 1   // Victim
0004: $2554 = 1   // Didier Sachs

//RBR/CG37: PDE's budget - keep for reference
//062A: change_float_stat 14 to 108039.0  // fashion budget (approx)
//062A: change_float_stat 62 to 108039.0  // total shopping budget

:CG_AllClothes_End
0051: return
 

 

 

If you want to use the memory write process to add individual items you can look up the sequence of flags under "section prices" at the beginning of shopping.dat.

Edited by OrionSR
Code Tags
Link to comment
Share on other sites

Big_Mitch_Baker

Thank you good sir, got it working perfectly icon14.gif

Link to comment
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
 Share

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

×
×
  • Create New...

Important Information

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