Jump to content

Here is My Finished Actor Driving Code


Recommended Posts

ThePlague1988

 

{$CLEO .cs}thread 'CAR_DRIVE':PLAYER_TESTERwait 0if0256: player $PLAYER_CHAR definedelse_jump @PLAYER_TESTER0247: load_model #COPCARSF0247: load_model #BFYST038B: load_requested_models:MODEL_TESTERwait 0if and0248: model #COPCARSF available0248: model #BFYST availableelse_jump @MODEL_TESTER00A5: 0@ = create_car #COPCARSF at 2494.0989 -1677.8737 13.33690129: 1@ = create_actor_pedtype 4 model #BFYST in_car 0@ driverseatCar.DoorStatus(0@, 1)gosub @PLAYER_CLOSE_TO_CAR 05CA: AS_actor $PLAYER_ACTOR enter_car 0@ passenger_seat 0 10000 ms0526: set_actor 1@ stay_in_car 1 gosub @PLAYER_IN_CAR05D1: AS_actor 1@ drive_car 0@ to 2307.6448 -1655.9983 14.3567 speed 35.0 0 model #NULL 0:ACTOR_NEAR_POINTwait 0if00EE:   actor $PLAYER_ACTOR 0 near_point 2307.6448 -1655.9983 radius 5.0 5.0 in_car else_jump @ACTOR_NEAR_POINT05CD: AS_actor 1@ exit_car 0@gosub @DESTROY_ACTOR009B: destroy_actor 1@end_thread // 0A93: end_custom_thread:PLAYER_IN_CARwait 0if00DB: actor $PLAYER_ACTOR in_car 0@else_jump @PLAYER_IN_CARreturn:PLAYER_CLOSE_TO_CARwait 0if and0203:   actor $PLAYER_ACTOR near_car 0@ radius 5.0 5.0 flag 0 on_foot 00DB:   actor 1@ in_car 0@ else_jump @PLAYER_CLOSE_TO_CARreturn:DESTROY_ACTORwait 0if80DB: not actor 1@ in_car 0@else_jump @DESTROY_ACTORreturn

 

 

It works perfectly.

Link to comment
https://gtaforums.com/topic/462355-here-is-my-finished-actor-driving-code/
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
  • 0 User Currently Viewing
    0 members, 0 Anonymous, 0 Guests

×
×
  • Create New...

Important Information

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