Quantcast

Jump to content

» «
Photo

Adding Car Spawn Locations

181 replies to this topic
TheHeggy
  • TheHeggy

    Conan Rules

  • Members
  • Joined: 17 Jun 2004

#1

Posted 12 June 2005 - 12:36 AM Edited by Gangsta Killa, 24 April 2009 - 10:49 PM.






Heggy's Guide To Adding Car Spawn Locations
In Grand Theft Auto: San Andreas

Okay, this is actually very easy to do and shouldn't take you more than 30 minutes even if you're new to all of this. I'm going to try to be as specific and "step by step" as I can so that even people who've never done this before will be able to have a little fun.

To begin, you'll need the following tools:
San Andreas Mission Builder v0.33
San Andreas Place Manager
Once you have downloaded and extracted those programs, open SASCM.ini located in whatever folder you unzipped the mission builder to. At the end of that file (below everything else), add the following text:

CODE
0A4A=2,%1h% %2h%
0A4B=0,


Save it and close the file.
Now you need to decide where you want your vehicle to spawn. Just for fun, I'm going to put a Hotdog van on top of that really high building in Los Santos.

Boot up the game and head to wherever you want your vehicle to appear.
Once you're at a spot you like, take note of what direction you want your vehicle to be facing (north, south, east, west...), then alt + tab out of the game and run San Andreas Place Manager. This program will tell us the exact coordinates of our location so we can define it in the main.scm.

Click "Add Place", and a small window should pop up. Click the button that says "Click here to insert your current ingame location", and three values for the X, Y and Z coordinates will show up. Write these down or put them in a text file, as you'll need to remember them later.

user posted image

user posted image

Close San Andreas Place Manager, and shut down the game itself.
Open up your San Andreas Mission Builder program. Click "File >> Open File". Make sure the file type in the Open File window is set to "SCM File (*.SCM)", otherwise your file won't show up.

Navigate to your San Andreas main.scm. For me, it's located in "C:\Program Files\Rockstar Games\GTA San Andreas\data\script". Once you have the file select, hit OK. A second window will open, hit OK in that one too. It will take a minute or two for the program to read and open the file, so be patient.
When the file finally opens, hit ctrl + F to open the Find menu. Search for 014B: $2777 = init_parked_car_generator. We're going to add our spawn point above this piece of code. I'm sure there's numerous other places it would work, but this just seems to work the best for me.

On a new line above the code you just found, type the following:

QUOTE
014B: $ tower_hotdog = init_parked_car_generator 588 -1 -1 1 alarm 0 door_lock 0 0 10000 at 1555.183 -1352.873 329.4553 angle 90.0


The green text should be replaced with something descriptive of your new location, so you can find it easily if you need to change something. I've named mine tower_hotdog. The blue text is your vehicle ID. I'm going make a list of all the IDs and their associated vehicles at the end of this tutorial tonight so it's easier for you to find what you need, but everything is defined in the vehicles.ide file in the data directory. It'll be the first number before every vehicle name. The text in yellow is the coordinates the San Andreas Place Manager gave me. You'll want to enter your X, Y and Z coordinates in place of my own. The text in red is your vehicle's orientation. Since I'm putting my vehicle on top of a tower, the direction it's facing doesn't really matter. If you want yours facing a particular way, here's how it breaks down:

North = 0.0
South = 180.0
East = 90.0
West = -90.0

Those other numbers aren't really important as far as the scope of this tutorial goes, but I'll probably write another tutorial about those at a later date.

On a new line below the code you just typed, put the following:

QUOTE
014C: set_parked_car_generator $ tower_hotdog cars_to_generate_to 101


Notice that I have my tower_hotdog label in there -- Whatever you replaced the green text with on the above line needs to go there as well.

My code looked like this when I was done:
user posted image
You're done with the coding part, so go to the "Run" menu and select "Compile". Just like when you opened the file, it will take a moment or two for it to finish thinking. Once it's done, close the program and open the folder where the San Andreas Mission Builder program is located. Your new MAIN.SCM file and a new SCRIPT.IMG file should be in there.

In a new window, navigate to wherever the game's original main.scm is located and rename it to something else, like "oldmain.scm", and then rename script.img to something else. You don't want to lose the originals!

After renaming the file, drag the new MAIN.SCM and SCRIPT.IMG into the folder.
That's it! Load up San Andreas and go check out your new car smile.gif

user posted image

(IMPORTANT: Your current saved games will not work with your new main.scm file, so you'll need to start a new game. If you ever want to play your old saved games, you'll need to revert back to the original main.scm and script.img files)
If you have any questions, I'll do my best to help. I'm no modding guru, but I'm definitely not new at this smile.gif

TheHeggy
  • TheHeggy

    Conan Rules

  • Members
  • Joined: 17 Jun 2004

#2

Posted 12 June 2005 - 02:45 AM Edited by TheHeggy, 12 June 2005 - 08:18 PM.

Vehicle IDs As Defined In Vehicles.ide


= 2-Door & Compact =

NameID NameID
Alpha602 Hustler545
Blista Compact496 Majestic517
Bravura401 Manana410
Buccaneer518 Picador600
Cadrona527 Previon436
Club589 Stafford580
Esperanto419 Stallion439
Feltzer533 Tampa549
Fortune526 Virgo491
Hermes474

= 4-Door & Luxery =

NameID NameID
Admiral445 Oceanic467
Damaged Glendale604 Premier426
Elegant507 Primo547
Emperor585 Sentinel405
Euros587 Stretch409
Glendale466 Sunrise550
Greenwood492 Tahoma566
Intruder546 Vincent540
Merit551 Washington421
Nebula516 Willard529

= Aircraft =

NameID NameID
Andromada592 Nevada553
AT-400577 News Chopper488
Beagle511 Police Maverick497
Cargobob548 Raindance563
Cropduster512 Rustler476
Dodo593 Seasparrow447
Hunter425 Shamal519
Hydra520 Skimmer460
Leviathan417 Sparrow469
Maverick487 Stuntplane513

= Bikes =

NameID NameID
BF-400581 Sanchez468
Bike509 Wayfarer586
BMX481
Faggio462
FCR-900521
Freeway463
Mountain Bike510
NRG-500522
PCJ-600461
Pizza Boy448

= Boats =

NameID
Coastguard472
Dinghy473
Jetmax493
Launch595
Marquis484
Predator430
Reefer453
Speeder452
Squalo446
Tropic454

= Civil Servant & Transportation =

NameID NameID
Baggage485 Trolly**449
Brown Streak Engine**538 Utility Van552
Bus431
Cabbie438
Coach437
Freight537
Sweeper574
Taxi420
Towtruck525
Trashmaster408

= Government =

NameID NameID
Ambulance416 Police Car (Los Santos)596
Barracks433 Police Car (San Fierro)597
Enforcer427 Police Ranger599
FBI Rancher490 Rhino432
FBI Truck528 S.W.A.T.601
Fire Truck407 Securicar428
Fire Truck (Ladder)544
HPV1000523
Patriot470
Police Car (Las Venturas)598

= Heavy Trucks & Utility =

NameID NameID
Benson499 Hotdog588
Black Boxville609 Linerunner403
Boxville498 Linerunner (From "Tanker Commando")514
Cement Truck524 Mr. Whoopee423
Combine Harvester532 Mule414
DFT-30578 Packer443
Dozer486 Roadtrain515
Dumper406 Tractor531
Dune573 Yankee456
Flatbed455

= Light Trucks & Vans =

NameID NameID
Berkley's RC Van459 Sadler543
Bobcat422 Tug583
Burrito482 Walton478
Damaged Sadler605 Yosemite554
Forklift530
Moonbeam418
Mower572
News Van582
Pony413
Rumpo440

= Lowriders =

NameID
Blade536
Broadway575
Remington534
Savanna567
Slamvan535
Tornado576
Voodoo412

= Muscle Cars =

NameID
Buffalo402
Clover542
Phoenix603
Sabre475

= Other =

NameID
RC Cam*594
streakc**570

= RC Vehicles =

NameID
RC Bandit441
RC Baron464
RC Goblin501
RC Raider465
RC Tiger564

= Recreational =

NameID NameID
Bandito568 Monster 3557
BF Injection424 Quadbike471
Bloodring Banger504 Sandking495
Caddy457 Vortex539
Camper483
Journey508
Kart570
Mesa500
Monster444
Monster 2556

= Street Racers =

NameID NameID
Banshee429 Infernus411
Bullet541 Jester559
Cheetah415 Stratum561
Comet480 Sultan560
Elegy562 Super GT506
Flash565 Turismo451
Hotknife434 Uranus558
Hotring Racer494 Windsor555
Hotring Racer 2502 ZR-350477
Hotring Racer 3503

= SUVs & Wagons =

NameID
Huntley579
Landstalker400
Perennial404
Rancher489
Rancher (From "Lure")505
Regina479
Romero442
Solair458

= Trailers =

NameID NameID
Baggage Trailer (covered)606 Trailer 3591
Baggage Trailer (Uncovered)607
Farm Trailer610
Freight Train Boxcar**590
Freight Train Flatbed**569
"Street Clean" Trailer611
Trailer (From "Tanker Commando")608
Trailer (Stairs)435
Trailer 1450
Trailer 2591

**This vehicle doesn't show up

*This vehicle shows up as a drivable flower pot
user posted image

kingpug
  • kingpug

    boris

  • Members
  • Joined: 11 Jun 2005

#3

Posted 12 June 2005 - 11:50 AM

Do you have any idea why this wont work using an already modified main.scm?..

I tried the 2 new ones from Craig and Opius, and when I go to compile them they both say the exact same thing, label not found.

It only works using the original main.scm, so do you know whats wrong?

Btw sorry if you cant ask questions here, at the top it says you cant but you said we could ask, so I am confused, delete if we cant alien.gif

TheHeggy
  • TheHeggy

    Conan Rules

  • Members
  • Joined: 17 Jun 2004

#4

Posted 12 June 2005 - 04:37 PM

QUOTE (kingpug @ Jun 12 2005, 06:50)
Do you have any idea why this wont work using an already modified main.scm?..

I tried the 2 new ones from Craig and Opius, and when I go to compile them they both say the exact same thing, label not found.

It only works using the original main.scm, so do you know whats wrong?

Btw sorry if you cant ask questions here, at the top it says you cant but you said we could ask, so I am confused, delete if we cant alien.gif

The asking questions thing is just so people don't start a million threads in here asking how to do a bunch of stuff wink.gif I ran into the same thing with the missing label error, so I think it's because the San Andreas Mission Builder changes some code when it re-compiles it. I could be wrong though but that's just my best guess.

There's another mission builder someone here linked to that's on sourceforge or something so I'm going to give that one a shot today after I get the vehicle IDs posted and see if it works better. If it does, I'll update the tutorial smile.gif bbq.gif

kingpug
  • kingpug

    boris

  • Members
  • Joined: 11 Jun 2005

#5

Posted 12 June 2005 - 06:10 PM

Nah its ok I got it working, I tried spawning stuff at the airfield but did it wrong, I got a question:

What is the name of that jet that is in the airports, its fast and small, like an executie jet.

And whats the name of the small jumbo?..I spawned an at-400 and it wa shuge, obviously wrong.

TheHeggy
  • TheHeggy

    Conan Rules

  • Members
  • Joined: 17 Jun 2004

#6

Posted 12 June 2005 - 06:16 PM

I think you're talking about the Shamal, not sure about the mini jumbo.... I'm in the process of documenting every vehicle defined in vehicles.ide so that you don't have to go hunting through all of it. I've got about 19 more "weird" vehicles to go through and then I'll post everything. One of the vehicles is a damn flower pot... LOL

Oh and I figured out what the problem was with editing pre-modified scm files -- The program generates a new script.img file which you have to copy over with the main.scm. I just tried it and I can compile, de-compile and re-compile just fine now. Updating the tutorial...

gta_matt
  • gta_matt

    Bond...James Bond

  • Members
  • Joined: 11 Jun 2005

#7

Posted 12 June 2005 - 09:51 PM

sorry about the question but i must know.

is there gonna be any future updates where we dont have to start a new game?
i want to put some good cars at my garage and car lot in SF but dont want to have to start all over.

TheHeggy
  • TheHeggy

    Conan Rules

  • Members
  • Joined: 17 Jun 2004

#8

Posted 12 June 2005 - 10:13 PM

QUOTE (gta_matt @ Jun 12 2005, 16:51)
sorry about the question but i must know.

is there gonna be any future updates where we dont have to start a new game?
i want to put some good cars at my garage and car lot in SF but dont want to have to start all over.

Any edit to the main.scm file requires you to start a new game. The same was true for GTAIII and Vice City as well.

gta_matt
  • gta_matt

    Bond...James Bond

  • Members
  • Joined: 11 Jun 2005

#9

Posted 13 June 2005 - 12:41 AM

can i add more than one car spawn location by putting each code combination on top of eachother from where you mentioned?

TheHeggy
  • TheHeggy

    Conan Rules

  • Members
  • Joined: 17 Jun 2004

#10

Posted 13 June 2005 - 01:44 AM

Yep, you should be able to add as many as you like.

Vanquish
  • Vanquish

    Trick

  • Members
  • Joined: 29 Jun 2002

#11

Posted 13 June 2005 - 02:17 AM

I worked out how to do this last night with a little help from one of your other threads. I managed to spawn Andromada at Verdant Meadows easily enough anyway.

lollieman
  • lollieman

    Player Hater

  • Members
  • Joined: 12 Jul 2004

#12

Posted 13 June 2005 - 04:52 AM Edited by lollieman, 13 June 2005 - 05:33 AM.

If you don't want to use the ID for the cars and want it more simple like #hunter.

Just copy and paste your Vehicles.ide to your SA mission builder folder, best to do peds.ide and default.ide aswell.

Works fine

TheHeggy
  • TheHeggy

    Conan Rules

  • Members
  • Joined: 17 Jun 2004

#13

Posted 13 June 2005 - 07:41 AM

Hey thanks for that smile.gif Nice way to save a little work.

kingpug
  • kingpug

    boris

  • Members
  • Joined: 11 Jun 2005

#14

Posted 13 June 2005 - 07:44 AM Edited by kingpug, 13 June 2005 - 11:08 AM.

Yep I use names like SHAMAL or SANCHEZ etc.

Its great spawning vehicles, I filled up the airfield with some stuff like the hunter, stunt plane, crop-duster one and the shamal, along with a dirtbike and quad tounge.gif

Btw you can also do the same with weapons, well it looked similar, I will be having a look at that in a few minutes.

This is unreal, one minute it works then when I change some stuff and fo to compile it, it gets a label error, what the f*ck? angry.gif

ProfaNe
  • ProfaNe

    Player Hater

  • Members
  • Joined: 12 Jun 2005

#15

Posted 13 June 2005 - 11:14 AM Edited by ProfaNe, 13 June 2005 - 11:50 AM.

the mision builder link is down sad.gif
ah i got it now but it doesnt work i can only spawm 1 bike at a time smile.gif her is my code

i changed the coordinates every time and the ID 2 cause i want different bike's but now i onyl have 1 bike infrond of my house (beginners house)
please help whats wrong with my code smile.gif ?

014B: $10949 = init_parked_car_generator 468 -1 -1 1 alarm 0 door_lock 0 0 10000 at 2493.464 -1669.083 13.33595 angle 90.0
014C: set_parked_car_generator $10949 cars_to_generate_to 101
014B: $10948 = init_parked_car_generator 468 -1 -1 1 alarm 0 door_lock 0 0 10000 at 2493.466 -1669.083 13.33595 angle 90.0
014C: set_parked_car_generator $10948 cars_to_generate_to 101
014B: $10947 = init_parked_car_generator 521 -1 -1 1 alarm 0 door_lock 0 0 10000 at 2493.469 -1669.083 13.33595 angle 90.0
014C: set_parked_car_generator $10947 cars_to_generate_to 101
014B: $10946 = init_parked_car_generator 564 -1 -1 1 alarm 0 door_lock 0 0 10000 at 2493.469 -1671.083 13.33595 angle 90.0
014C: set_parked_car_generator $10946 cars_to_generate_to 101
014B: $10949 = init_parked_car_generator 506 -1 -1 1 alarm 0 door_lock 0 0 10000 at 2493.469 -1673.083 13.33595 angle 90.0
014C: set_parked_car_generator $10949 cars_to_generate_to 101
014B: $2777 = init_parked_car_generator 432 -1 -1 1 alarm 0 door_lock 0 0 10000 at 2435.302 -1671.848 12.8007 angle 90.0
014C: set_parked_car_generator $2777 cars_to_generate_to 0
014B: $PARKED_HYDRA = init_parked_car_generator 520 -1 -1 1 alarm 0 door_lock 0 0 10000 at 2527.2 -1677.1 19.2 angle 90.0
014C: set_parked_car_generator $PARKED_HYDRA cars_to_generate_to 0

Vanquish
  • Vanquish

    Trick

  • Members
  • Joined: 29 Jun 2002

#16

Posted 13 June 2005 - 12:32 PM

The first 3 "spawnings" are at identical locations .. get some slightly different co-ordinates for 2 of them and that should do the job smile.gif

Remix1121
  • Remix1121

    Rat

  • Members
  • Joined: 12 Jun 2005

#17

Posted 13 June 2005 - 12:45 PM Edited by Remix1121, 13 June 2005 - 01:17 PM.

Im getting a "parameter 2 not set" error anyone know what's wrong? Big n00b here sorry =) my code looks like this...

014B: $Feltzer = init_parked_car_generator 533 -1 -1 1 alarm 0 door_lock 0 0 10000 at 2486,339 -1655,602 13,3359 angle -90.0
014C: set_parked_car_generator $Feltzer cars_to_generate_to 101
014B: $SJ_Home1 = init_parked_car_generator 536 -1 -1 1 alarm 0 door_lock 0 0 10000 at 2491,237 -1682,849 13,33689 angle -90.0
014C: set_parked_car_generator $SJ_Home1 cars_to_generate_to 101
014B: $2777 = init_parked_car_generator 432 -1 -1 1 alarm 0 door_lock 0 0 10000 at 2435.302 -1671.848 12.8007 angle 90.0
014C: set_parked_car_generator $2777 cars_to_generate_to 0
014B: $PARKED_HYDRA = init_parked_car_generator 520 -1 -1 1 alarm 0 door_lock 0 0 10000 at 2527.2 -1677.1 19.2 angle 90.0
014C: set_parked_car_generator $PARKED_HYDRA cars_to_generate_to 0

NM i found the problem, I had "," instead of "." between the coordinates biggrin.gif

Vanquish
  • Vanquish

    Trick

  • Members
  • Joined: 29 Jun 2002

#18

Posted 13 June 2005 - 01:14 PM

Youve put commas instead of dots in your co-ordinates .. I think thats the problem.

Vanquish
  • Vanquish

    Trick

  • Members
  • Joined: 29 Jun 2002

#19

Posted 13 June 2005 - 01:14 PM

Sorry - double post.

ProfaNe
  • ProfaNe

    Player Hater

  • Members
  • Joined: 12 Jun 2005

#20

Posted 13 June 2005 - 02:16 PM

THNX< i have 5 cars now smile.gif but i have a strange thing there is alittle tank smile.gif i cant ride it it's strange..
but is there a car list of how the cars look like? and the names? cause i dont know the real fast ones the bieutifull ones smile.gif

Vanquish
  • Vanquish

    Trick

  • Members
  • Joined: 29 Jun 2002

#21

Posted 13 June 2005 - 04:03 PM Edited by Vanquish, 13 June 2005 - 09:21 PM.

QUOTE (ProfaNe @ Jun 13 2005, 14:16)
THNX< i have 5 cars now smile.gif but i have a strange thing there is alittle tank smile.gif i cant ride it it's strange..
but is there a car list of how the cars look like? and the names? cause i dont know the real fast ones the bieutifull ones smile.gif

I think its the RC Tiger your talking about .. a little RC tank. Heres pictures of almost all of the cars and Heggy has put the list of the numbers that correspond to these vehicles.

Vanquish
  • Vanquish

    Trick

  • Members
  • Joined: 29 Jun 2002

#22

Posted 13 June 2005 - 04:06 PM Edited by Vanquish, 13 June 2005 - 04:12 PM.

Just had a quick skim over and it seems the only vehicle its missed is andromada .. which is just a huge huge plane.

TheHeggy
  • TheHeggy

    Conan Rules

  • Members
  • Joined: 17 Jun 2004

#23

Posted 13 June 2005 - 08:29 PM

QUOTE (Vanquish @ Jun 13 2005, 12:06)
Just had a quick skim over and it seems the only vehicle its missed is andromada .. which is just a huge huge plane.

I listed the Andromada... First one under "Aircraft" wink.gif

Vanquish
  • Vanquish

    Trick

  • Members
  • Joined: 29 Jun 2002

#24

Posted 13 June 2005 - 09:14 PM

QUOTE (TheHeggy @ Jun 13 2005, 20:29)
QUOTE (Vanquish @ Jun 13 2005, 12:06)
Just had a quick skim over and it seems the only vehicle its missed is andromada .. which is just a huge huge plane.

I listed the Andromada... First one under "Aircraft" wink.gif

I meant the car picture list on that website. Dont for one second think im complaining about your listing skills biggrin.gif

Suction Testicle Man
  • Suction Testicle Man

    Yeah, well, you know, that's just, like, your opinion, man.

  • Moderator
  • Joined: 27 Sep 2002
  • None

#25

Posted 14 June 2005 - 01:33 AM

NO double-posting please. It is against the forum rules.

<3D

OverlordQ
  • OverlordQ

    Player Hater

  • Members
  • Joined: 09 Jun 2005

#26

Posted 14 June 2005 - 02:41 AM

I dont suppose there's anyway to edit your savegame too so you dont have to start over lol sad.gif

Vicetopia
  • Vicetopia

    Factory Overclocked

  • Members
  • Joined: 18 May 2003
  • United-States

#27

Posted 15 June 2005 - 01:36 AM

Anyway to make the colors random, like normal GTA car spawns?
All my vehicles are solid white. Probably has something to do with the '0 0' part.

TheHeggy
  • TheHeggy

    Conan Rules

  • Members
  • Joined: 17 Jun 2004

#28

Posted 15 June 2005 - 02:23 AM Edited by TheHeggy, 15 June 2005 - 02:36 AM.

QUOTE (Vicetopia @ Jun 14 2005, 21:36)
Anyway to make the colors random, like normal GTA car spawns?
All my vehicles are solid white.  Probably has something to do with the '0 0' part.

Hmm... All my cars are showing up random colors. I've been spawing BF Injections and stuff and they're always a different color.

I haven't really tried spawning a car that was a specific color, but the two -1 numbers (highlighted in orange) should be the ones you change... If you didn't know already, the numbers for the colors are defined in carcols.dat. I'm going to add all this to the tutorial since it's probably something a lot of people are going to want to do...

014B: $tower_hotdog = init_parked_car_generator 588 -1 -1 1 alarm 0 door_lock 0 0 10000 at 1555.183 -1352.873 329.4553 angle 90.0

Kitteh
  • Kitteh

    ^___________^

  • Members
  • Joined: 03 Jan 2004

#29

Posted 18 June 2005 - 07:54 AM Edited by Kitteh, 18 June 2005 - 08:26 AM.

Great tutorial.

However, I tried adding a Beagle spawn near the Prickle Pine safehouse to the Opened Up main.scm, I get the label error on compile and when I start a new game it crashes.

It did the same when I tried the AT-400 instead of the Beagle.

I don't want to do it on the default main.scm because then I won't even be able to get to my spawn sad.gif

Help me please.

CODE
014B: $personal_plane = init_parked_car_generator 511 -1 -1 1 alarm 0 door_lock 0 0 10000 at 1213.36 2512.172 15.82031 angle -90.0
014C: set_parked_car_generator $personal_plane cars_to_generate_to 101


EDIT: NEVERMIND! I FIGURED IT OUT

TheHeggy
  • TheHeggy

    Conan Rules

  • Members
  • Joined: 17 Jun 2004

#30

Posted 18 June 2005 - 09:32 AM

LOL glad you got it working.

Did you do anything other than what was in the tutorial to get it working? Please let me know so I can add it smile.gif




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users