Jump to content

Why do copcars spawn in their respective cities?


swapnil2809

Recommended Posts

swapnil2809

Need some help here.

Why do copcars spawn in their respective cities, why does a LSPD copcar not spawn in SF or LV. How is this controlled by SA.

If I need some of my modded car to spawn only in any particular city, what should I edit??

Not sure if someone asked this before, but couldnt find such a topic.

Link to comment
Share on other sites

spaceeinstein

map.zon. Only works for cop cars though.

Edited by spaceeinstein
Link to comment
Share on other sites

swapnil2809

Thanks for the info spaceeinstein!!

So it means i cannot add a car which will spawn only in LS sad.gif

Link to comment
Share on other sites

You could try setting some zones in LS to type 13 SHOPPING_BUSY, which isn't used in a normal game, and modify the the appropriate ped and car groups to include your vehicle.

Link to comment
Share on other sites

Cop spawning id hardcoded. A simple array of model IDs, with the current 'island' used as an index.

Link to comment
Share on other sites

swapnil2809

You said "cop spawnning".

Can I add some random vehicle and have it spawned only in any of the 3 cities or rural SA.

 

Also OrionSR, didnt get you exactly, can you describe a bit more!

Link to comment
Share on other sites

TheGodfather.
Please help!!

Someone reply.

You can Make some cars spawn only in cities you choose but then you will have to change the cargrp.dat ,Popcycle.dat ,pedgrp.dat & you'll also have to edit the main.scm file such that the car you wish should not spawn anywhere else .I tried it with turismo and made it spawn only in Los Santos and it worked (atleast for now) .I searched other places for turismo but I didnt find I think it will work .Just check it out if any doubts You can ask me.... nervous.gif

Link to comment
Share on other sites

swapnil2809

Editing main.scm. Hmm

Can it be not done by CLEO??

Link to comment
Share on other sites

Here's an idea the might work with a little editing of cagrp.dat and a CLEO script. Add your vehicles to an appropriate car group, then check CJ's town number and disable the appropriate models as he moves from city to city with a cleo script. The relevant codes are listed below.

 

Keep in mind that car groups can only support 23 models; Causal Rich and Casual Average are already too full, which is why the Phoenix doesn't not spawn in traffic without some modifications.

 

 

04A3:   $CURRENT_TOWN_NUMBER == 1 // $ == any 0842: $CURRENT_TOWN_NUMBER = player $PLAYER_CHAR town_number 0732: random_car_generator_disable_model #SAVANNA 0733: random_car_generator_enable_model #SAVANNA 0734: reset_random_car_generator_models 

 

 

It is possible to alter the car groups with CLEO memory writes. I can try to find the memory addresses if this is really important for sharing your mod or something. But it'd be easier to test with an altered cargrp.dat first.

Edited by OrionSR
Link to comment
Share on other sites

If you get it working and want to change the car groups with CLEO the structure starts at 0xC0ED38. Each group is 46 bytes long and consists of 23 words. Each word is the vehicle ID for the cars in the group (Linerunner = 403).

Link to comment
Share on other sites

I tried it with turismo and made it spawn only in Los Santos and it worked.I searched other places for turismo but I didnt find I think it will work . tounge.gifuser posted image

Link to comment
Share on other sites

swapnil2809

Hi All!!

Too bad, I tried a few things but could not get this right!!

If I may post this as a request now, can someone create a mod like this confused.gif

Link to comment
Share on other sites

  • 4 months later...

This is a bump, but I got one question, how to have a ped spawn only in 1 city, and can that ped be assigned to a particular vehicle, ie only that ped drives this vehicle.

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