truthfinder Posted January 22, 2018 Share Posted January 22, 2018 (edited) 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 January 22, 2018 by truthfinder Link to comment Share on other sites More sharing options...
skatefilter5 Posted January 22, 2018 Share Posted January 22, 2018 (edited) 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 January 22, 2018 by skatefilter5 Link to comment Share on other sites More sharing options...
truthfinder Posted January 22, 2018 Author Share Posted January 22, 2018 Thanks a lot! I'm not sure if it helps the paths problem, though... Givin it a try. Link to comment Share on other sites More sharing options...
truthfinder Posted January 24, 2018 Author Share Posted January 24, 2018 (edited) 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 January 24, 2018 by truthfinder Link to comment Share on other sites More sharing options...
Sanmodder Posted January 24, 2018 Share Posted January 24, 2018 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 More sharing options...
truthfinder Posted January 25, 2018 Author Share Posted January 25, 2018 (edited) 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 January 25, 2018 by truthfinder Sanmodder 1 Link to comment Share on other sites More sharing options...