{$CLEO .cs}

//-------------MAIN---------------
0000: NOP 
:MOTOengine_1
jump @carAttach_10
wait 0 
if and
actor.Driving($PLAYER_ACTOR)
0AB0:  key_pressed 49   // /-=1=-
else_jump @MOTOengine_1
03C0: 0@ = actor $PLAYER_ACTOR car
041E: set_radio_station 6 
00BC: show_text_highpriority GXT 'FEM_OK' time 3000 flag 1
wait 2000
if
actor.Driving($PLAYER_ACTOR)
0AB0:  key_pressed 49   // /-=1=-
 else_jump @MOTOengine_2
 00BC: show_text_highpriority GXT 'FEM_ON' time 3000 flag 1
 wait 1000
 
 :MOTOengine_2
 car.RemoveReferences(0@)
 wait 1000
 jump @MOTOengine_1
 
 //==============================
 :carAttach_10
wait 0 
if or
actor.DrivingVehicleType($PLAYER_ACTOR,#MOTOCICLE02)
actor.DrivingVehicleType($PLAYER_ACTOR,#MOTOCICLE03)
actor.DrivingVehicleType($PLAYER_ACTOR,#MOTOCICLE04)
actor.DrivingVehicleType($PLAYER_ACTOR,#MOTOCICLE05)
actor.DrivingVehicleType($PLAYER_ACTOR,#MOTOCICLE06)
actor.DrivingVehicleType($PLAYER_ACTOR,#MOTOCICLE07)
actor.DrivingVehicleType($PLAYER_ACTOR,#MOTOCICLE08)
actor.DrivingVehicleType($PLAYER_ACTOR,#MOTOCICLE09)
else_jump @carAttach_10a
jump @MOTO_prisvoenie_1

:carAttach_10a
wait 0 
if or
actor.DrivingVehicleType($PLAYER_ACTOR,#MOTOCICLE10)
actor.DrivingVehicleType($PLAYER_ACTOR,#MOTOCICLE11)
actor.DrivingVehicleType($PLAYER_ACTOR,#MOTOCICLE12)
actor.DrivingVehicleType($PLAYER_ACTOR,#MOTOCICLE13)
actor.DrivingVehicleType($PLAYER_ACTOR,#MOTOCICLE14)
actor.DrivingVehicleType($PLAYER_ACTOR,#MOTOCICLE15)
actor.DrivingVehicleType($PLAYER_ACTOR,#HD_VRSCA)
else_jump @carAttach_10
jump @MOTO_prisvoenie_1

:MOTO_prisvoenie_1
5@ = 463
03C0: 0@ = actor $PLAYER_ACTOR car
gosub @CARload_0
wait 500
jump @carattach_11

:carattach_11
wait 0
if and
 actor.Driving($PLAYER_ACTOR)
 8686:   not car 2@ attached
 else_jump  @carattach_12
 0683: attach_car 2@ to_car 0@ at_offset 0.0 -1.50 0.50 rotation 0.0 0.0 0.0
wait 200
 jump  @carattach_12
 
 :carattach_12
wait 0
if
 not actor.Driving($PLAYER_ACTOR)
 else_jump  @carattach_11
 02D4: unknown_turn_off_car 2@ engine
 041E: set_radio_station 12
 0955: end_playing_loaded_soundtrack //     
 0683: attach_car 2@ to_car 0@ at_offset 0.0 200.0 1.0 rotation 0.0 0.0 0.0
car.RemoveReferences(0@)
car.RemoveReferences(2@)
wait 2000
0465: remove_actor $PLAYER_ACTOR from_turret_mode 
player.CanMove($PLAYER_CHAR) = true
0221: set_player $PLAYER_CHAR trapped_in_car 0
Camera.Restore_WithJumpCut
 jump  @carattach_10
//======================================= 
 :CARload_0
Model.Load(5@)
038B: load_requested_models 

:CARload_2
wait 0
if
 model.Available(5@)
 else_jump @CARload_2
 0407: create_coordinate 21@ 22@ 23@ from_car 0@ offset 0.0 0.0 -5.0
 car.Create(2@,5@,21@, 22@, 23@)
 0338: set_car 2@ visibility 0 
 099A: set_car 2@ collision_detection 0 
 0683: attach_car 2@ to_car 0@ at_offset 0.0 0.0 0.50 rotation 0.0 0.0 0.0
 car.SetImmunities(2@,1,1,1,1,1)
 072A: put_actor $PLAYER_ACTOR into_car 2@ driverseat
 072A: put_actor $PLAYER_ACTOR into_car 0@ driverseat
 wait 1000
 model.Destroy(5@)
 0683: attach_car 2@ to_car 0@ at_offset 0.0 -1.50 0.50 rotation 0.0 0.0 0.0
 return
 
 :ACTOR_CREAT
 wait 0
 04C4: store_coords_to 21@ 22@ 23@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 -0.50 
 09C7: change_player $PLAYER_CHAR model_to #NULL
 return
 
 