{$CLEO .cs}

//-------------MAIN---------------
0000:nop

:POLMAV         //          .     ...   
wait 3000
model.load(#POLMAV)
model.load(#M4)
model.load(#SWAT)
038B: load_requested_models
//0390: load_txd_dictionary "COPMAV"  // TXD  -        
///038F: request_texture "COPMAV" as  21  // -        
//  :
//wait 0
//038D: create_texture  21 position  100.0  100.0 scale  190.0  190.0 color  255  255  255 alpha 255 //    ( ,    )
//wait 2000
//03F0: text_draw_toggle  0 //     
//wait 0
//0391: release_txd_dictionary //  TXD'
 

:COPMAV_1
wait 0
if and
 model.Available(#POLMAV)
 Model.Available(#M4)
 Model.Available(#SWAT)
 else_Jump @COPMAV_1
 car.Create(0@,#POLMAV,2489.6772, -1673.9407, 13.3359)
 wait 12000
  model.Destroy(#POLMAV)
   model.Destroy(#M4)
    model.Destroy(#SWAT)
  car.RemoveReferences(0@)
  
 //======================= ====      ===            .
 :POLMAV_ENTER_CAR_2
 wait 0
 if and
  00EF:   actor $PLAYER_ACTOR 0 near_point 1765.6672 -2271.6682 radius 22.0 22.0 stopped 
  actor.DrivingVehicleType($PLAYER_ACTOR,#POLMAV) //      #POLMAV ....
else_jump @POLMAV_ENTER_CAR_2
03C0: 0@ = actor $PLAYER_ACTOR car //  0@-      
04C4: store_coords_to 21@ 22@ 23@ from_actor $PLAYER_ACTOR with_offset -6.0 0.0 0.0  //         .
//Actor.Create(12@,04,#SWAT,21@, 22@, 23@)//  .   . 
gosub @LOAD_SWAT
Actor.Create(12@,04,#SWAT,1765.6672, -2271.6682, 26.796)//  .   .
01B2: give_actor 12@ weapon 31 ammo 600 //     
wait 1000
 model.Destroy(#SWAT)
  model.Destroy(#M4)
//01B2: give_actor $PLAYER_ACTOR weapon 31 ammo 600 //     ?
//0841: flying_vehicle 0@ use_secondary_gun 1 //   ? 1- 0-
//0430: put_actor 12@ into_car 0@ passenger_seat 5000  //      
05CA: AS_actor 12@ enter_car 0@ passenger_seat 0 -1 ms 
//0788: enable_heli 0@ magnet 1
 054C: use_GXT_table 'LAFIN1' 
00BC: show_text_highpriority GXT 'FIN1_AL' time 5000 flag 1 // !

 
:ACTOR_PILOT_DRIVER
wait 0
if
 actor.DrivingVehicleType(12@,#POLMAV)
 else_jump @ACTOR_PILOT_DRIVER_1
 00BC: show_text_highpriority GXT 'MJET_3A' time 5000 flag 1 //!
 wait 1000
 00BA: show_text_styled GXT 'FEC_TAB' time 1000 style 2
 Jump @POLMAV_3
 
  :ACTOR_PILOT_DRIVER_1 // 
  wait 0
   if or
   0119: car 0@ wrecked         //  
   8202:   not actor 12@ near_car 0@ radius 30.0 30.0 flag 0
   actor.Dead(12@)
   actor.Dead($PLAYER_ACTOR)
   else_jump @ACTOR_PILOT_DRIVER
   actor.RemoveReferences(12@)    //   
  car.RemoveReferences(0@)      //   o
  wait 1000
  jump @POLMAV_ENTER_CAR_2
   
 //====================  ===================
 //=====================      ,         =======================================
:POLMAV_3
wait 0
if and
  actor.DrivingVehicleType($PLAYER_ACTOR,#POLMAV)
  0AB0:  key_pressed 9 //-=TAB=-
  //00E1: key_pressed 0 4 //-=TAB=-
else_jump @PILOT_SWAT_1
0470: 27@ = actor $PLAYER_ACTOR current_weapon //-     -     .
04C4: store_coords_to 21@ 22@ 23@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 0.0 //         .
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 21@ 22@ 23@  //         
0464: put_actor $PLAYER_ACTOR into_turret_on_car 0@ at_car_offset 0.80 0.40 0.40 position 3 shooting_angle_limit 180.0 with_weapon 27@ //  
//player.CanMove($PLAYER_CHAR) = false
Actor.LockInCurrentPosition($PLAYER_ACTOR) = true
Car.LockInCurrentPosition(0@) = true  // 
 wait 1000
  24@ = 0.0 //   - 
  25@ = 0.0 //   -
  26@ = 0.0  //   - 
 Actor.LockInCurrentPosition($PLAYER_ACTOR) = false
 Car.LockInCurrentPosition(0@) = FALSE  //P 
 0390: load_txd_dictionary "COPMAV"  // TXD  -        
038F: request_texture "COPMAV" as  21  // -        
//  :
wait 0
038D: create_texture  21 position  100.0  100.0 scale  190.0  190.0 color  255  255  255 alpha 255 //    ( ,    )

jump @POLMAV_4   
    
    :PILOT_SWAT_1
wait  0
if and
 actor.DrivingVehicleType($PLAYER_ACTOR,#POLMAV)
 0AB0:  key_pressed 17 //-=TRL=-
 Else_jump @CRASH_HELIcopter
 gosub @LOAD_SWAT
Car.LockInCurrentPosition(0@) = true   //    
0407: store_coords_to 21@ 22@ 23@ from_car 0@ with_offset 1.30 0.0 1.20 //         .
0503: create_rappel 27 #SWAT at 21@ 22@ 23@ with_actor 11@  //    27 SWAT        11@
wait 1000
 model.Destroy(#SWAT)
Car.LockInCurrentPosition(0@) = FALSE  // 
actor.RemoveReferences(11@) //   .
jump @POLMAV_3 
  
:CRASH_HELIcopter
wait 0
if  or
 not actor.DrivingVehicleType(12@,#POLMAV)
 actor.Dead(12@)
 8202:   not actor $PLAYER_ACTOR near_car 0@ radius 20.0 20.0 flag 0 
 actor.Dead($PLAYER_ACTOR) //-    
 0119: car 0@ wrecked         //  
 Else_jump @POLMAV_3
 0465: remove_actor $PLAYER_ACTOR from_turret_mode  //      
 actor.DestroyInstantly(12@)
 0407: store_coords_to 21@ 22@ 23@ from_car 0@ with_offset 500.0 500.0 1.20
 04A2: heli 0@ fly_to 21@ 22@ 23@ speed 60.0 60.0
 wait 15000
  car.RemoveReferences(0@)      //   
  jump @POLMAV_ENTER_CAR_2
  //==========NOT_DRIVER========
  :NOT_DIVER_HELICOPTER
  Actor.LockInCurrentPosition($PLAYER_ACTOR) = false
 Car.LockInCurrentPosition(0@) = FALSE  //P 
  //0465: remove_actor $PLAYER_ACTOR from_turret_mode  //      
 actor.RemoveReferences(12@)    //   
  car.RemoveReferences(0@)      //   
  jump @POLMAV_ENTER_CAR_2
  
 //====================================================
  //==========       ==========================================
   //=========     ===========================================
:POLMAV_4
wait 0
if
  0AB0:  key_pressed 69 //-=e=-     
  //00E1: key_pressed 0 15 //-=E=-
else_jump @PILOT_STRELOK_1
03F0: text_draw_toggle  0 //     
wait 0
0391: release_txd_dictionary //  TXD'
Actor.LockInCurrentPosition($PLAYER_ACTOR) = true
Car.LockInCurrentPosition(0@) = true  // 
0465: remove_actor $PLAYER_ACTOR from_turret_mode  //      
wait 1000
072A: put_actor $PLAYER_ACTOR into_car 0@ driverseat
wait 1000
 Actor.LockInCurrentPosition($PLAYER_ACTOR) = false
 Car.LockInCurrentPosition(0@) = FALSE  //P 
wait 0
jump @POLMAV_3  
 
:PILOT_STRELOK_1  //          
wait  0
04A2: heli 0@ fly_to 21@ 22@ 23@ speed 24@ 25@ //    .       .
//         .       .
if
 0AB0:  key_pressed 87 //-=W-=-  
 Else_jump @PILOT_STRELOK_2
04C4: store_coords_to 21@ 22@ 23@ from_actor $PLAYER_ACTOR with_offset 0.0 26@ 0.0 
26@ += 10.0    //  10     
//01E3: text_1number_styled 'M_PASS' 26@ 5000 ms 4 //       .     .     .
if 
 26@ > 500.0       //   ˸   500       .
Else_jump @PILOT_STRELOK_1
26@ = 500.0 
//01E3: text_1number_styled 'M_PASS' 26@ 5000 ms 4
 jump @PILOT_STRELOK_1
 
:PILOT_STRELOK_2
wait  0
if
 0AB0:  key_pressed 83 //-=S=-- 
 Else_jump @PILOT_STRELOK_3
04C4: store_coords_to 21@ 22@ 23@ from_actor $PLAYER_ACTOR with_offset 0.0 26@ 0.0
26@ = 0.0          //       .
24@ -= 10.0       //    
25@ -= 10.0       //    
//01E3: text_1number_styled 'M_PASS' 26@ 5000 ms 4
   jump @PILOT_STRELOK_2

 :PILOT_STRELOK_3
wait  0
if
 0AB0:  key_pressed 32 //SPACE- 
 Else_jump @PILOT_STRELOK_4 
 0407: store_coords_to 21@ 22@ 23@ from_car 0@ with_offset 0.0 0.0 0.0 
24@ = 0.0
25@ = 0.0
//01E3: text_1number_styled 'M_PASS' 25@ 5000 ms 4 
 jump @PILOT_STRELOK_3

   :PILOT_STRELOK_4
wait  0
if
 0AB0:  key_pressed 16 //SHIFT- ˨  -    -
 Else_jump @PILOT_STRELOK_5
 03F0: text_draw_toggle  0 //     
wait 0
0391: release_txd_dictionary //  TXD'
0407: store_coords_to 21@ 22@ 23@ from_car 0@ with_offset 0.0 0.0 0.0 
24@ = 60.0
25@ = 60.0
//01E3: text_1number_styled 'M_PASS' 25@ 5000 ms 4
jump @PILOT_STRELOK_5

   :PILOT_STRELOK_5
wait  0
if
 0AB0:  key_pressed 9 //-=tab=--    .    -
 Else_jump @CRASH_HELIcopter_2
 wait 2000
 if
 0AB0:  key_pressed 9 //-=tab=--    .    -
 Else_jump @CRASH_HELIcopter_2
 
Car.LockInCurrentPosition(0@) = true  // 
0407: store_coords_to 21@ 22@ 23@ from_car 0@ with_offset 1.30 0.0 1.20
0503: create_rappel 27 #NULL at 21@ 22@ 23@ with_actor 13@
actor.SetImmunities(13@,1,1,1,1,1)
0407: store_coords_to 21@ 22@ 23@ from_car 0@ with_offset 1.30 0.0 1.20
player.CanMove($PLAYER_CHAR) = false
player.CanMove($PLAYER_CHAR) = True
//0679: put_camera_on_vehicle 0@ offset -5.0 -15.0 0.0 rotation 0.0 5.0 1.0 0.0 2
067B: put_camera_on_car 0@ offset -20.5 -1.5 0.0 point_to_actor 13@ tilt 6.0 2 
wait 1000
//actor.RemoveReferences(11@)
//actor.RemoveReferences(13@)
//wait 2000
jump @ACTOR_STEP_EARTH
//======================================
:ACTOR_STEP_EARTH //   .
wait 0
0819: 21@ = actor 13@ distance_from_ground
   if or
    04AD:   actor 13@ in_water 
    21@ <= 2.0
    else_Jump @ACTOR_STEP_EARTH
    player.ClearWantedLevel($PLAYER_CHAR) 
    Car.LockInCurrentPosition(0@) = FALSE //
    0465: remove_actor $PLAYER_ACTOR from_turret_mode
    04C4: store_coords_to 21@ 22@ 23@ from_actor 13@ with_offset 0.0 0.0 0.0 
      
      :ACTOR_STEP_EARTH_2
      if
       04AD:   actor 13@ in_water 
       else_Jump @ACTOR_STEP_EARTH_3
       04C4: store_coords_to 21@ 22@ 23@ from_actor 13@ with_offset 0.0 0.0 3.0
     
     :ACTOR_STEP_EARTH_3  
    wait 1000
    Camera.Restore_WithJumpCut
    actor.DestroyInstantly(13@)
    actor.PutAt($PLAYER_ACTOR,21@, 22@, 23@)
    jump @POLMAV_3 
//======================================  
:CRASH_HELIcopter_2  //   
wait 0
if or
//8204:   not actor $PLAYER_ACTOR near_car 0@ radius 55.0 55.0 flag 0 in_car 
 //not actor.Driving($PLAYER_ACTOR) //    
 actor.Dead($PLAYER_ACTOR) //-    
 0119: car 0@ wrecked   // 
 Else_jump @POLMAV_4
 03F0: text_draw_toggle  0 //     
wait 0
0391: release_txd_dictionary //  TXD'
 0465: remove_actor $PLAYER_ACTOR from_turret_mode  //      
 actor.RemoveReferences(12@)
  car.RemoveReferences(0@)
  jump @POLMAV_ENTER_CAR_2
  
  ///=====================
  :LOAD_SWAT         //          .     ...   
wait 0
model.load(#SWAT)
model.load(#M4)
038B: load_requested_models

:LOAD_SWAT_1
wait 0
if and
 Model.Available(#M4)
 Model.Available(#SWAT)
 else_Jump @LOAD_SWAT_1
return