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

[SA] How to delete existing car spawn locations?


swapnil2809
 Share

Recommended Posts

swapnil2809

I want to create spawn locations for some planes at the airports and for that I would need a cleaned up airport. How can the existing vehicle spawn locations be removed. Can all those Shamals, Nevadas, Dodos that spawn at the airports be deleted?

Link to comment
Share on other sites

Some vehicles are spawned through script. (main.scm) That requires script rewriting and starting new game.

Vehicles can also be spawned using IPL files. (Normal, human-readable IPL files and binary IPL files from gta3.img.)

Link to comment
Share on other sites

Except for the AT-400 parked in the hangar at the LV airport, all of the other aircraft at the LS and LV airports are streamed in from binary ipl files stored in gta3.img. There are tools that can edit these files but I'm not sure how to use them.

 

The AT-400 and aircraft at the SF airport are added when a new game starts and are included in the save data. You don't necessarily need to delete these vehicles unless you are adding large numbers of vehicles and are worried about clogging the gargen pool. Each vehicle is identified by a global variable handle and can be hidden or displayed with opcode 014C:. The SF aircraft are two sets of matching vehicles, one set is locked and displayed early in the game and another set is unlocked and hidden. During flight school the locked planes are hidden and the unlocked set is displayed. If you hide or delete these vehicles you'll also need to manage their global variables. These are manageable objectives.

 

Deleting parked vehicles from an existing save is awkward, but possible. There aren't any standard commands for removing car generators but we know enough about managing SA memory to tweak the allocation byte and force the vehicle to be discard, either by editing the save with a hex editor or writing to memory with cleo scripts.

 

Editing main.scm to modify how the cargens spawn is more trouble than it's worth. In the long run it's easier to let the scripts do their thing and then rebuilt the cargen pool and recreate the vehicles the way you want by extracting all the cargen codes from the main scripts and managing the codes in a custom script.

Edited by OrionSR
Link to comment
Share on other sites

swapnil2809

Thanks for the info guys!

All sounds a bit too complex for me, also, no point in starting a new game.

Link to comment
Share on other sites

You can also note down the global variables of the cars spawned by main.scm and then destroy them using a cleo script.

Link to comment
Share on other sites

Cleo3 Example:

// Test code that unallocates the East LS Clover so that it won't be saved.{$CLEO .cs}0000:				while true  wait 250  if    0AB0:   key_pressed 0x77    // F8    then                                                                              0085: [email protected] = $2766 // index of the East LS Clover    [email protected] *= 0x20       // cargen record size    [email protected] += 0x00c27ad0 // start of cargen structure    [email protected] += 0x1D       // offset to allocation byte (save offset -2)    0A8C: write_memory [email protected] size 1 value 0 virtual_protect 0    wait 250    00BB: show_text_lowpriority GXT 'FESZ_LS' time 2000 flag 1  // Load Successful.  endend

SCM Function:

:DeleteCarGenerator// Adapted from fastman92's DisableCarGeneratorFromBeingSaved function// Example: 0AB1: call_scm_func @DeleteCarGenerator 1 cargen_index [email protected]// Is invalid generator ID?if or  -1 >= [email protected]  [email protected] >= 500then  0AB2: ret 0end0A8D: [email protected] = read_memory 0x6F32AA size 1 virtual_protect false // CCarGenerator_size0AA7: call_function 0x479D60 num_params 1 pop 1 [email protected] store_result_to [email protected] // CCarGenerator* ptrif  [email protected] >= 0x30 // is CCarGenerator_extended ?then  [email protected] += 0x24 // *** untested ***  0A8C: write_memory [email protected] size 2 value 0x0 virtual_protect false // exIplFileelse  [email protected] += 0x1D  0A8C: write_memory [email protected] size 1 value 0x0 virtual_protect false // iplFileend0AB2: ret 0
Link to comment
Share on other sites

swapnil2809

Sorry for the late response guys but thanks, yes that works!

 

Another issue that I have is, a bit offtopic though;

 

I was using ya_4's park your car mod to park my newly added (not replaced) planes, but due to some other crashing mod, had to reinstall my SA. And now, that doesnt work for my added cars. No error or crashes, but the cars can't be parked.

 

I tried spawning added cars using below script, but no success:

 

//-------------MAIN---------------0A95: enable_thread_saving 014B: [email protected] = init_parked_car_generator #BT400 color 1 1 1 alarm 0 door_lock 0 0 10000 at -1303.948 -269.7776 17.1277 angle 168.8698 014C: set_parked_car_generator [email protected] cars_to_generate_to 101 0A93: end_custom_thread 

Any help?

Edited by swapnil2809
Link to comment
Share on other sites

014B: [email protected] = init_parked_car_generator #BT400 color 1 1 1 alarm 0 door_lock 0 0 10000 at -1303.948 -269.7776 17.1277 angle 168.8698

 

BT400? Did you mean BF400?

Edited by Guest
Link to comment
Share on other sites

swapnil2809

No, I added (not replaced) a plane and named it BT400 and want to spawn/park it.

Link to comment
Share on other sites

Aha, so you want to make car generator for added cars.

 

First thing I noticed is that you are compiling this as default script, not CLEO script.

Add the following line on top of your script: {$CLEO .cs}

 

If you try to compile it you will get the following error:

 

QOSdeJI.png

 

That picture says everything, I don't need to explain.

 

Btw, I'm not sure if opcode 014B works on added cars, you should ask somebody working on total conversions to see if its working.

Link to comment
Share on other sites

swapnil2809

Hi, I compiled the script as a Cleo script, sorry for the confusion caused due to me not copying {$CLEO .cs} in the post!

 

& 014B worked :lol: I changed the vehicle id from 18631 to 612. Yet to add and check more vehicles!

Link to comment
Share on other sites

Aha, so you want to make car generator for added cars.

 

First thing I noticed is that you are compiling this as default script, not CLEO script.

Add the following line on top of your script: {$CLEO .cs}

 

If you try to compile it you will get the following error:

 

QOSdeJI.png

 

That picture says everything, I don't need to explain.

 

Btw, I'm not sure if opcode 014B works on added cars, you should ask somebody working on total conversions to see if its working.

It might be trying 'fastman92 limit adjuster', which has option to make car generator with any vehicle ID. Edited by fastman92
Link to comment
Share on other sites

  • 3 years later...
juleswinnfield2517

Is there a simple mod around for un-parking, or removing generated parked vehicles due to park-anywhere mods?

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.