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

    3. Suggestions

[GTA SA] Suicidal Airplanes File


Silver102
 Share

Recommended Posts

Silver102

Hello. I have added a lot of vehicles including planes to my GTA and I wish they would appear in the sky along with planes like the at400 and the Andromada, but I don't know how.
I tried to change it with "Model Variations" but it was to no avail.

Link to comment
Share on other sites

3 hours ago, Silver102 said:

Hello. I have added a lot of vehicles including planes to my GTA and I wish they would appear in the sky along with planes like the at400 and the Andromada, but I don't know how.
I tried to change it with "Model Variations" but it was to no avail.

It's hardcoded. I think the function which controlls those random planes is:
 

void CPlane::DoPlaneGenerationAndRemoval() {    //  0x6CD2F0
    //  ...
}

 

Spoiler
Yep, it does:
injector::WriteMemory<DWORD>(0x6CDA0E + 6, MODEL_RUSTLER);
injector::WriteMemory<DWORD>(0x6CDA31 + 6, MODEL_CROPDUST);
injector::WriteMemory<DWORD>(0x6CDA54 + 6, MODEL_BEAGLE);
injector::WriteMemory<DWORD>(0x6CDAB1 + 6, MODEL_POLMAV);
injector::WriteMemory<DWORD>(0x6CDBA6 + 6, MODEL_ANDROM);
injector::WriteMemory<DWORD>(0x6CDBC9 + 6, MODEL_AT400);

 

 

Edited by Jack
Link to comment
Share on other sites

Silver102
48 minutes ago, Jack said:

It's hardcoded. I think the function which controlls those random planes is:
 

void CPlane::DoPlaneGenerationAndRemoval() {    //  0x6CD2F0
    //  ...
}

 

  Hide contents
Yep, it does:
injector::WriteMemory<DWORD>(0x6CDA0E + 6, MODEL_RUSTLER);
injector::WriteMemory<DWORD>(0x6CDA31 + 6, MODEL_CROPDUST);
injector::WriteMemory<DWORD>(0x6CDA54 + 6, MODEL_BEAGLE);
injector::WriteMemory<DWORD>(0x6CDAB1 + 6, MODEL_POLMAV);
injector::WriteMemory<DWORD>(0x6CDBA6 + 6, MODEL_ANDROM);
injector::WriteMemory<DWORD>(0x6CDBC9 + 6, MODEL_AT400);

 

 


Then it cannot be edited?

Link to comment
Share on other sites

Silver102
7 hours ago, Jack said:

It can be edited. Just change those plane model ID values to your owns and the new planes should appear. 

And where is this function exactly? In what file?

Link to comment
Share on other sites

1 hour ago, Silver102 said:

And where is this function exactly? In what file?

Functions are part of the executable file. There're a lot of them so we use the public gta database created by interactive disassembler (IDA) to quickly navigate through the file. Models are easy to find since in gta SA they have large values so we start a binary search. For example the plane named rustler has model ID 476 (according to vehicles.ide file). So in order to discover it I start a binary search because it's quick:

476 = 0x1DC = DC 01 00 00

The search result led me to the function called:

CPlane::DoPlaneGenerationAndRemoval();

When I look it closely I realised it's right what you need (scm): 

0A8C: write_memory 0x6CDA14 size 4 value #RUSTLER vp false
0A8C: write_memory 0x6CDA37 size 4 value #CROPDUST vp false
0A8C: write_memory 0x6CDA5A size 4 value #BEAGLE vp false
0A8C: write_memory 0x6CDBAC size 4 value #ANDROM vp false
0A8C: write_memory 0x6CDBCF size 4 value #AT400 vp false

No need for model load since those values write themselves to a single variable which is used later to load plane models automaticly. So the game does it for us. 

Edited by Jack
Link to comment
Share on other sites

Silver102

I can't understand it. I can't find this "public gta database created by interactive disassembler (IDA)" unless I get it wrong.
I don't know much about scripts, I thought it was just enough to change or add a value to a file. And I can't even find the right function.
I'd love to learn how to do it, but if it's too time-consuming, I'll just let those planes go.

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.