Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (86,159 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    4. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Forum Support

    2. Site Suggestions

truthfinder

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

Recommended Posts

truthfinder

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

Share this post


Link to post
Share on other sites
skatefilter5

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

Share this post


Link to post
Share on other sites
truthfinder

Thanks a lot! I'm not sure if it helps the paths problem, though... Givin it a try.

Share this post


Link to post
Share on other sites
truthfinder

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

Share this post


Link to post
Share on other sites
Sanmodder

 

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

Share this post


Link to post
Share on other sites
truthfinder

 

 

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

Share this post


Link to post
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

×

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.