Jump to content

Adding Peds Driving Vehicles


Gtapoptart

Recommended Posts

I was wondering how to add pedestrians driving vehicles on a certain road at a certain place (map mod).

 

Any Help??

Link to comment
Share on other sites

Try this:

004F: create_thread ££LabelSpawnCar:LabelSpawnCar03A4: name_thread 'SPWNCAR'; NOTES:; 1 - Press ACTION KEY + ENTER VEHICLE KEY to spawn a car with a driver.; 2 - Depending of the model of the vehicle the game CRASHES. You have to test more.; 3 - Use local variables whenever possible.; 4 - I used the Mission Builder to make this thread, if you use Sanny Builder simply use the source converter.:LabelSpawnCar020001: wait 0 ms00D6: if 48117:   NOT player $PLAYER_CHAR wasted8741:   NOT actor $PLAYER_ACTOR busted80DF:   NOT actor $PLAYER_ACTOR driving0256:   player $PLAYER_CHAR defined03EE:   player $PLAYER_CHAR controllable004D: jump_if_false ££LabelSpawnCar0400D6: if 000E1:   key_pressed 0 4    ; ACTION KEY004D: jump_if_false ££LabelSpawnCar0200D6: if 080E1:   NOT key_pressed 0 15; ENTER VEHICLE KEY004D: jump_if_false ££LabelSpawnCar050002: jump ££LabelSpawnCar02:LabelSpawnCar030001: wait 0 ms00D6: if 080E1:   NOT key_pressed 0 15; ENTER VEHICLE KEY004D: jump_if_false ££LabelSpawnCar0301B4: set_player $PLAYER_CHAR frozen_state 10002: jump ££LabelSpawnCar02:LabelSpawnCar040001: wait $DEFAULT_WAIT_TIME ms0002: jump ££LabelSpawnCar02:LabelSpawnCar0501B4: set_player $PLAYER_CHAR frozen_state 0 (frozen)0001: wait 0 ms0209: @0 = random_int 400 612; These numbers are in the file "VEHICLE.IDE" models IDs 400 to 611.0247: request_model @0038B: load_requested_models:LabelSpawnCar05_020001: wait 0 ms00D6: if 00248:   model @0 available004D: jump_if_false ££LabelSpawnCar05_020208: @1 = random_float -12.5 12.50208: @2 = random_float -12.5 12.50208: @3 = random_float 0.0 360.004C4: create_coordinate @4 @5 @6 from_actor $PLAYER_ACTOR offset @1 @2 25.000A5: @7 = create_vehicle @0 at @4 @5 @60175: set_car @7 z_angle_to @30560: @1 = create_random_driver_in_vehicle @70819: @2 = actor @1 distance_from_ground0013: @2 *= -1.00407: create_coordinate @3 @4 @5 from_car @7 offset 0.0 0.0 @200AB: put_car @7 at @3 @4 @509B3: get_vehicle @7 door_status @200D6: if 00019:   @2 > 1004D: jump_if_false ££LabelSpawnCar06020A: set_car @7 door_status_to 1:LabelSpawnCar0601C2: remove_references_to_actor @101C3: remove_references_to_car @70249: release_model @00002: jump ££LabelSpawnCar03

 

Read the notes in code please!

Edited by Rapier
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.