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. Forum Support

    3. Suggestions

[SA|CLEO] Need some help in traffic paths.


truthfinder
 Share

Recommended Posts

Hi everyone! Coded up my script for autodriving to waypoint, even implemented some kind of "path refreshing," and everything seems to be working, but that thing gets lost, if the waypoint is too far from me. Is there any opcode to... idk... store all points along path to waypoint, or make the car drive only along paths? Something like that. Any help would be appreciated.

Oh, and also, is it possible to "enable" car engine sounds while CJ is "autodriving?"

0000: NOP Thread 'NICEAUTODRIVER'var $autopilotactivated : Integerend:Checkwait 0 if Actor.Driving($PLAYER_ACTOR)jf @[email protected] = Actor.CurrentCar($PLAYER_ACTOR)      0AB6: store_target_marker_coords_to [email protected] [email protected] [email protected] // IF and SET02C1: store_to [email protected] [email protected] [email protected] car_path_coords_closest_to [email protected] [email protected] [email protected]$autopilotactivated == 1then jump @IsThereend   jump @Normal:Normalwait 0if 0ab0: key_pressed 90jf @Fast                00AE: set_car [email protected] traffic_behaviour_to 0Car.SetMaxSpeed([email protected], 15.0)    0423: set_car [email protected] improved_handling_to 0.5 // (float)018C: play_sound 1058 at 0.0 0.0 0.0wait 100jump @IsThere:Fastwait 0if 0ab0: key_pressed 88jf @CheckStop 00AE: set_car [email protected] traffic_behaviour_to 2Car.SetMaxSpeed([email protected], 30.0)               0423: set_car [email protected] improved_handling_to 1.5 // (float)       018C: play_sound 1058 at 0.0 0.0 0.0      wait 100jump @IsThere :CheckStopwait 0if and$autopilotactivated == 10ab0: key_pressed 67jf @Checkwait 100jump @Stop:IsTherewait 0if$autopilotactivated == 1then wait 100endif    0100:   actor $PLAYER_ACTOR in_sphere [email protected] [email protected] [email protected] radius 15.0 15.0 15.0 sphere 0 in_carjf @Drivejump @Stop:Drivewait 0                     Car.DriveTo([email protected], [email protected], [email protected], [email protected])$autopilotactivated = 1 jump @CheckStop:Stopwait 0Car.SetMaxSpeed([email protected], 0.0)       wait 1000                                            0423: set_car [email protected] improved_handling_to 1.0 // (float)072A: put_actor $PLAYER_ACTOR into_car [email protected] driverseat 018C: play_sound 1058 at 0.0 0.0 0.0   $autopilotactivated = 0   jump @Check
Edited by truthfinder
Link to comment
Share on other sites

maybe put a ped as driving then set wait to 500 then destroy actor and set the car's engine on and the lights on too and it works, it use to happen with this script the ghost car http://www.gtainside.com/en/sanandreas/mods/107540-ghost-car-scary-version maybe take that for the example

Edited by skatefilter5
Link to comment
Share on other sites

Thx a lot! I managed to create player's clone as a driver, and now can hear all the sounds. But the paths problem still remains...

 

EDIT: Can't get that sh*t to disappear. What's wrong?

0337: set_actor $PLAYER_ACTOR visibility 00619: enable_actor $PLAYER_ACTOR collision_detection 0 072B: put_actor $PLAYER_ACTOR into_car [email protected] passengerseat -10665: get_actor $PLAYER_ACTOR model_to [email protected]@ = Actor.CreateAsDriver(CivMale, [email protected], [email protected])0ABE:   vehicle [email protected] engine_on                 Car.DriveTo([email protected], [email protected], [email protected], [email protected])$autopilotactivated = 1 
Edited by truthfinder
Link to comment
Share on other sites

 

Thx a lot! I managed to create player's clone as a driver, and now can hear all the sounds. But the paths problem still remains...

 

EDIT: Can't get that sh*t to disappear. What's wrong?

0337: set_actor $PLAYER_ACTOR visibility 00619: enable_actor $PLAYER_ACTOR collision_detection 0 072B: put_actor $PLAYER_ACTOR into_car [email protected] passengerseat -10665: get_actor $PLAYER_ACTOR model_to [email protected][email protected] = Actor.CreateAsDriver(CivMale, [email protected], [email protected])0ABE:   vehicle [email protected] engine_on                 Car.DriveTo([email protected], [email protected], [email protected], [email protected])$autopilotactivated = 1 

 

player in this way can not be made invisible

it would be too easy

so you can only invisible actors

try this

you only need all the parts of the body

0784: set_player $ PLAYER_CHAR textureCRC 0 modelCRC 0 bodypart 16

0784: set_player $ PLAYER_CHAR textureCRC 0 modelCRC 0 bodypart 17

Link to comment
Share on other sites

 

 

Thx a lot! I managed to create player's clone as a driver, and now can hear all the sounds. But the paths problem still remains...

 

EDIT: Can't get that sh*t to disappear. What's wrong?

0337: set_actor $PLAYER_ACTOR visibility 00619: enable_actor $PLAYER_ACTOR collision_detection 0 072B: put_actor $PLAYER_ACTOR into_car [email protected] passengerseat -10665: get_actor $PLAYER_ACTOR model_to [email protected][email protected] = Actor.CreateAsDriver(CivMale, [email protected], [email protected])0ABE:   vehicle [email protected] engine_on                 Car.DriveTo([email protected], [email protected], [email protected], [email protected])$autopilotactivated = 1 

 

player in this way can not be made invisible

it would be too easy

so you can only invisible actors

try this

you only need all the parts of the body

0784: set_player $ PLAYER_CHAR textureCRC 0 modelCRC 0 bodypart 16

0784: set_player $ PLAYER_CHAR textureCRC 0 modelCRC 0 bodypart 17

 

This stuff only nudes my char.

 

Edit: That's my code. It's working.

0665: get_actor $PLAYER_ACTOR model_to [email protected]: enable_actor $PLAYER_ACTOR collision_detection 0 0337: set_actor $PLAYER_ACTOR visibility 0       [email protected] = Actor.Create(CivMale, [email protected], 0.0, 0.0, 0.0)[email protected] = Actor.Create(CivMale, [email protected], 0.0, 0.0, 0.0)[email protected] = Actor.Create(CivMale, [email protected], 0.0, 0.0, 0.0)[email protected] = Actor.Create(CivMale, [email protected], 0.0, 0.0, 0.0)   0619: enable_actor [email protected] collision_detection 0 0619: enable_actor [email protected] collision_detection 0 0619: enable_actor [email protected] collision_detection 0  0337: set_actor [email protected] visibility 0       0337: set_actor [email protected] visibility 0       0337: set_actor [email protected] visibility 0               0430: put_actor [email protected] into_car [email protected] passenger_seat -10430: put_actor [email protected] into_car [email protected] passenger_seat -10430: put_actor [email protected] into_car [email protected] passenger_seat -1          072B: put_actor $PLAYER_ACTOR into_car [email protected] passengerseat -1072A: put_actor [email protected] into_car [email protected] driverseat0ABE:   vehicle [email protected] engine_on                 Car.DriveTo([email protected], [email protected], [email protected], [email protected])$autopilotactivated = 1 
Edited by truthfinder
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.