Jump to content

Denser Traffic For GTA 3


_Rob_

Recommended Posts

I have looked into this once or twice.

 

 

01EB: set_car_density_to 1.5

 

 

That's supposed to increase traffic, but I've tried it with many different values and none seem to actually work. confused.gif

 

There's also a script I once developed that chose a random number 90-150 and used it as a car spawn ID, spawning as close as possible to the player with a roughly 200 point offset. This worked fairly well, but the whole "cars falling from the sky" thing didn't always work out. I could modify this and send it to you if you want.

 

Furthermore, I *assume* it is possible through editing the exe file.

pkmTc.gif

Link to comment
Share on other sites

Sure I'd love to take a look, but yeah I mean with the hardware we have now, streaming several hundred cars at a time shouldn't be an issue.

Link to comment
Share on other sites

 

{$CLEO .cs}03A4: name_thread 'SPAWN':SPAWN_0010001: wait 0 ms0209: 0@ = random_int_in_ranges 90 15000D6: if and8038:   not 0@ == 97 // integer values 8038:   not 0@ == 106 // integer values8038:   not 0@ == 107 // integer values8038:   not 0@ == 116 // integer values8038:   not 0@ == 117 // integer values8038:   not 0@ == 120 // integer values8038:   not 0@ == 122 // integer values8038:   not 0@ == 124 // integer values004D: jump_if_false @SPAWN_00100D6: if and8038:   not 0@ == 125 // integer values8038:   not 0@ == 126 // integer values8038:   not 0@ == 131 // integer values8038:   not 0@ == 140 // integer values8038:   not 0@ == 141 // integer values8038:   not 0@ == 142 // integer values004D: jump_if_false @SPAWN_00100D6: if and8038:   not 0@ == 143 // integer values8038:   not 0@ == 147 // integer values8038:   not 0@ == 150 // integer values004D: jump_if_false @SPAWN_0010247: request_model 0@ :SPAWN_0020001: wait 0 ms00D6: if0248:   model 0@ available 004D: jump_if_false @SPAWN_0020006: 1@ = 0 // integer values 0006: 2@ = 0 // integer values 0006: 3@ = 0 // integer values 0054: store_player $PLAYER_CHAR position_to 1@ 2@ 3@0054: store_player $PLAYER_CHAR position_to 7@ 8@ 9@0008: 1@ += 100 // integer values 0008: 2@ += 100 // integer values 0008: 3@ += 10 // integer values0008: 7@ += 300 // integer values 0008: 8@ += 300 // integer values 0008: 9@ += 10 // integer values 0004: 5@ = -1 // integer values008D: 1@ = integer_to_float 1@008D: 2@ = integer_to_float 2@008D: 3@ = integer_to_float 3@008D: 7@ = integer_to_float 7@008D: 8@ = integer_to_float 8@008D: 9@ = integer_to_float 9@ 02C1: set 1@ 2@ 3@ to_car_path_coords_closest_to 1@ 2@ 3@02C1: set 7@ 8@ 9@ to_car_path_coords_closest_to 7@ 8@ 9@00A5: 10@ = create_car 0@ at 1@ 2@ 3@  0129: 5@ = create_actor 4 #COP in_car 10@ driverseat   00A7: car 10@ drive_to 7@ 8@ 9@008C: 1@ = float_to_integer 1@ 008C: 2@ = float_to_integer 2@008C: 3@ = float_to_integer 3@008C: 7@ = float_to_integer 7@008C: 8@ = float_to_integer 8@008C: 9@ = float_to_integer 9@0008: 1@ += -200 // integer values 0008: 2@ += -200 // integer values 0008: 3@ += 10 // integer values0008: 7@ += -600 // integer values 0008: 8@ += -600 // integer values 0008: 9@ += 10 // integer values 0004: 6@ = -1 // integer values008D: 1@ = integer_to_float 1@008D: 2@ = integer_to_float 2@008D: 3@ = integer_to_float 3@008D: 7@ = integer_to_float 7@008D: 8@ = integer_to_float 8@008D: 9@ = integer_to_float 9@02C1: set 1@ 2@ 3@ to_car_path_coords_closest_to 1@ 2@ 3@02C1: set 7@ 8@ 9@ to_car_path_coords_closest_to 7@ 8@ 9@00A5: 11@ = create_car 0@ at 1@ 2@ 3@  0129: 6@ = create_actor 4 #COP in_car 11@ driverseat00A7: car 11@ drive_to 7@ 8@ 9@008C: 1@ = float_to_integer 1@ 008C: 2@ = float_to_integer 2@008C: 3@ = float_to_integer 3@008C: 7@ = float_to_integer 7@008C: 8@ = float_to_integer 8@008C: 9@ = float_to_integer 9@0001: wait 100 ms01C2: remove_references_to_actor 5@01C3: remove_references_to_car 10@01C2: remove_references_to_actor 6@01C3: remove_references_to_car 11@ 0249: release_model 0@0002: jump @SPAWN_001 

 

As you can see, it is in a very raw form. The cars are only driven by cops right now, and only around 2-6 spawn per second. But you get the idea.

 

Any input, requests, comments?

 

DL link - http://upload.tjbp.net/spawn.zip

 

They also spawn at strange offsets. I had a check that calculated the new position using the sine and cosine of the player's angle, but I'll be damned if I didn't lose it. sad.gif

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