{$CLEO .cs} //    - 
//-------------MAIN---------------
0000:nop   //      -    
 wait 3500
 
 :MOTO_ZONE_START_1
wait 0
//if  
//0AB0:   key_pressed 70///f
//else_jump @MOTO_ZONE_START_2
//04C4: store_coords_to 21@ 22@ 23@ from_actor $PLAYER_ACTOR with_offset 0.0 6.0 1.0 
//29@ = #SANCHEZ
//gosub @LOAD_MODEL_1
//car.Create(0@,29@,21@, 22@, 23@)
//model.Destroy(29@) 
//06ED: set_car 0@ paintjob 1 
//
// wait 0
//car.RemoveReferences(0@)
//jump @MOTO_ZONE_START_1

:MOTO_ZONE_START_2  //
 wait 0
if  and
$ONMISSION == 0
actor.DrivingVehicleType($PLAYER_ACTOR,#SANCHEZ)
//00EC:   actor $PLAYER_ACTOR 0 near_point 433.8311 -1780.7858  radius 90.0 90.0 
else_jump @MOTO_ZONE_START_3
04B8: get_weapon_data_from_actor $PLAYER_ACTOR weapon_group 5 weapon 11@ ammo 12@ model 13@ 
0555: remove_weapon 28 from_actor $PLAYER_ACTOR
0555: remove_weapon 29 from_actor $PLAYER_ACTOR
0555: remove_weapon 32 from_actor $PLAYER_ACTOR
jump @CROSS_fristale_0

:MOTO_ZONE_START_3  //-LOS SANTOS
 wait 0
if  and
$ONMISSION == 0
047A:   actor $PLAYER_ACTOR driving_bike 
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2325.7434 -1677.2263 14.4219 radius 10.0 10.0 10.0 
else_jump @MOTO_ZONE_START_4
21@ = 2325.7434
22@ = -1677.2263
23@ = 14.4219
marker.CreateIconAndSphere(1@,15,21@, 22@, 23@)
jump @MOTO_ZONE_LS_1

:MOTO_ZONE_START_4  //- San Fierro
 wait 0
if  and
$ONMISSION == 0
047A:   actor $PLAYER_ACTOR driving_bike 
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -2552.54 54.0738 16.5933 radius 10.0 10.0 10.0 
else_jump @MOTO_ZONE_START_5
21@ = -2552.54
22@ = 54.0738
23@ = 16.5933
marker.CreateIconAndSphere(1@,15,21@, 22@, 23@)
jump @MOTO_ZONE_LS_1

:MOTO_ZONE_START_5  //- Lasventuras
 wait 0
if  and
$ONMISSION == 0
047A:   actor $PLAYER_ACTOR driving_bike 
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2405.8271 1482.8713 10.8203 radius 10.0 10.0 10.0 
else_jump @MOTO_ZONE_START_1
21@ = 2405.8271
22@ = 1482.8713
23@ = 10.8203
marker.CreateIconAndSphere(1@,15,21@, 22@, 23@)
jump @MOTO_ZONE_LS_1
//======================
//======================
//======================
:MOTO_ZONE_LS_1  //
 wait 0
077E: 24@ = active_interior
wait 0 
if and
24@ == 0
$ONMISSION == 0
047A:   actor $PLAYER_ACTOR driving_bike 
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 21@ 22@ 23@ radius 1.0 1.0 1.0 
else_jump @MOTO_ZONE_LS_2
if
0122:   player $PLAYER_CHAR pressing_horn 
else_jump @MOTO_ZONE_LS_2
03C0: 0@ = actor $PLAYER_ACTOR car 
actor.StorePos($PLAYER_ACTOR,24@, 25@, 26@)
marker.Disable(1@)
0221: set_player $PLAYER_CHAR trapped_in_car 1 
jump @BIKE_garage_0

:MOTO_ZONE_LS_2
wait 0 
if //and
//not actor.Driving($PLAYER_ACTOR)
80FE:   not actor $PLAYER_ACTOR sphere 0 in_sphere 21@ 22@ 23@ radius 15.0 15.0 15.0 
else_jump @MOTO_ZONE_LS_1
marker.Disable(1@)
wait 1000
jump @MOTO_ZONE_START_1

//=======================
//=======================    
//=======================
:BIKE_garage_0
$ONMISSION = 1
0180: set_on_mission_flag_to $ONMISSION 
01B4: toggle_player $PLAYER_CHAR can_move 0 //
29@ = 14798
gosub @LOAD_MODEL_1
04C4: store_coords_to 21@ 22@ 23@ from_actor $PLAYER_ACTOR with_offset 0.0 3.0 -20.0
object.Create(1@,29@,21@, 22@, 23@)
0400: store_coords_to 21@ 22@ 23@ from_object 1@ with_offset 1.65 -0.05 -2.55  
model.Destroy(29@)
29@ = 14797
gosub @LOAD_MODEL_1
object.Create(2@,29@,21@, 22@, 23@)
model.Destroy(29@)
object.RemoveReferences(2@)

29@ = 972 //
gosub @LOAD_MODEL_1
0400: store_coords_to 21@ 22@ 23@ from_object 1@ with_offset -10.0 2.0 -2.55  
object.Create(2@,29@,21@, 22@, 23@)
object.RemoveReferences(2@)
//0400: store_coords_to 21@ 22@ 23@ from_object 1@ with_offset 4.0 -2.0 -2.55  
//object.Create(2@,29@,21@, 22@, 23@)
model.Destroy(29@)
//object.RemoveReferences(2@)
gosub @KRASKOPULT_load_1
gosub @BOLGARKA_load_1
gosub @KOLESO_load_1
gosub @BOX_load_1
0400: store_coords_to 21@ 22@ 23@ from_object 1@ with_offset 4.0 5.0 1.0 
0A40: 6@ = create_entrance_marker_at 21@ 22@ 23@ color 14

0400: store_coords_to 21@ 22@ 23@ from_object 1@ with_offset -1.0 1.0 -1.0  
actor.PutAt($PLAYER_ACTOR,21@, 22@, 23@)
//=========== =================
//21@ = car.Model(0@)
//09E1: get_car_model 21@ price_to 22@ //10000
//0227: 27@ = car 0@ health
//22@ /= 1000 //  1-   
//0072: 22@ /= 27@ // (int) 2
//0072: 22@ /= 27@ // (int) 
//006A: 27@ *= 22@ // (int)  
//045B: draw_text_2numbers 500.0 335.0 GXT 'number' numbers 27@ 0
select_interior 1
0840: link_car 0@ to_interior 1 //-   
0860: link_actor $PLAYER_ACTOR to_interior 1 //-   
wait 2000
0390: load_txd_dictionary "cstuni"  // TXD  -        
038F: request_texture "menubike1" as  20
038F: request_texture "healthbike" as  21
gosub @CAR_HEALTH_menu_garageBIKE_0 
01B4: toggle_player $PLAYER_CHAR can_move 1 //
0221: set_player $PLAYER_CHAR trapped_in_car 0
jump @BIKE_garage_1

//======================
//======================     .
//======================
:KRASKOPULT_load_1
29@ = 2750 // 
gosub @LOAD_MODEL_1
0400: store_coords_to 21@ 22@ 23@ from_object 1@ with_offset 0.80 4.70 -0.20 
object.Create(2@,29@,21@, 22@, 23@)
0453: object 2@ set_rotation 90.0 90.0 90.0
model.Destroy(29@)
return

:BOLGARKA_load_1
29@ = 2750  //
gosub @LOAD_MODEL_1
//04C4: store_coords_to 21@ 22@ 23@ from_actor $PLAYER_ACTOR with_offset 0.0 1.0 0.0
0400: store_coords_to 21@ 22@ 23@ from_object 1@ with_offset 0.80 -3.0 -1.20 
object.Create(3@,29@,21@, 22@, 23@)
0453: object 3@ set_rotation 90.0 90.0 90.0
model.Destroy(29@)
29@ = 1861  //
gosub @LOAD_MODEL_1
//04C4: store_coords_to 21@ 22@ 23@ from_actor $PLAYER_ACTOR with_offset 0.0 1.0 0.0
object.Create(4@,29@,21@, 22@, 23@)
model.Destroy(29@)
069A: attach_object 4@ to_object 3@ at_offset 0.40 0.0 0.25 rotation 90.0 0.0 0.0
return

:KOLESO_load_1
29@ = 1073  //
gosub @LOAD_MODEL_1
//04C4: store_coords_to 21@ 22@ 23@ from_actor $PLAYER_ACTOR with_offset 0.0 1.0 0.0
0400: store_coords_to 21@ 22@ 23@ from_object 1@ with_offset 1.0 -2.0 -1.20 
object.Create(5@,29@,21@, 22@, 23@)
0453: object 5@ set_rotation 0.0 0.0 90.0
08D2: object 5@ scale_model 0.8
model.Destroy(29@)
return

:BOX_load_1
29@ = 3016 //  
gosub @LOAD_MODEL_1
0400: store_coords_to 21@ 22@ 23@ from_object 1@ with_offset -2.0 4.0 -1.20 
object.Create(7@,29@,21@, 22@, 23@)
0453: object 7@ set_rotation 0.0 0.0 90.0
model.Destroy(29@)
return
//=============================
//=============================    
//=============================
:BIKE_garage_1  //
wait 0
if 
actor.Driving($PLAYER_ACTOR)
//00E1: key_pressed 0 4
else_jump @BIKE_garage_2
if
0122:   player $PLAYER_CHAR pressing_horn 
else_jump @BIKE_garage_2
01B4: toggle_player $PLAYER_CHAR can_move 0 //
0390: load_txd_dictionary "cstuni"  // TXD  -        
038F: request_texture "menubike1" as  20
038F: request_texture "healthbike" as  21
gosub @CAR_HEALTH_menu_garageBIKE_0
03F0: text_draw_toggle  0 //     
wait 0
0391: release_txd_dictionary //  TXD'
wait 1000
03C0: 0@ = actor $PLAYER_ACTOR car
select_interior 0
0840: link_car 0@ to_interior 0 //-   
0860: link_actor $PLAYER_ACTOR to_interior 0 //-   

object.StorePos(1@,21@, 22@, 23@)
0395: clear_area 1 at 21@ 22@ 23@ range 50.0
actor.PutAt($PLAYER_ACTOR,24@, 25@, 26@)
object.Destroy(1@)
object.Destroy(2@)  //
object.Destroy(3@) //
object.Destroy(4@)//
object.Destroy(5@)//
0A41: destroy_entrance_marker 6@
object.Destroy(7@)//
01B4: toggle_player $PLAYER_CHAR can_move 1 //
$ONMISSION = 0
0180: set_on_mission_flag_to $ONMISSION 
wait 4000
jump @MOTO_ZONE_START_1

:BIKE_garage_2  //
if and
not actor.Driving($PLAYER_ACTOR)
00E1: key_pressed 0 4//TAB
else_jump @BIKE_garage_3
jump @BIKE_garage_ATACH_istrument_1

:BIKE_garage_3  //  
0400: store_coords_to 21@ 22@ 23@ from_object 1@ with_offset 4.0 5.0 0.0 
if or
8471: not unknown_actor $PLAYER_ACTOR near_object 1@ radius 50.0 50.0 unknown 0 -  
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 21@ 22@ 23@ radius 1.0 1.0 1.0 
else_jump @BIKE_garage_1
if
not actor.Driving($PLAYER_ACTOR)
else_jump @BIKE_garage_1
01B4: toggle_player $PLAYER_CHAR can_move 0 //
0390: load_txd_dictionary "cstuni"  // TXD  -        
038F: request_texture "menubike1" as  20
038F: request_texture "healthbike" as  21

0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 28@
   if
   056E: 0@
else_jump @END_garage_1
if
0202:   actor $PLAYER_ACTOR near_car 0@ radius 20.0 20.0 flag 0
else_jump @END_garage_1
gosub @CAR_HEALTH_menu_garageBIKE_0
player.Money($PLAYER_CHAR) += 27@

:END_garage_1
03F0: text_draw_toggle  0 //     
wait 0
0391: release_txd_dictionary //  TXD'
select_interior 0
0860: link_actor $PLAYER_ACTOR to_interior 0 //-   
object.StorePos(1@,21@, 22@, 23@)
0395: clear_area 1 at 21@ 22@ 23@ range 50.0
actor.PutAt($PLAYER_ACTOR,24@, 25@, 26@)
object.Destroy(1@)
object.Destroy(2@)  //
object.Destroy(3@) //
object.Destroy(4@)//
object.Destroy(5@)//
0A41: destroy_entrance_marker 6@
object.Destroy(7@)//
01B4: toggle_player $PLAYER_CHAR can_move 1 //
$ONMISSION = 0
0180: set_on_mission_flag_to $ONMISSION 
wait 4000
jump @MOTO_ZONE_START_1
//============================
//============================   .
//============================
:BIKE_garage_ATACH_istrument_1 //
if
0471: unknown_actor $PLAYER_ACTOR near_object 2@ radius 0.80 0.80 unknown 0
else_jump @BIKE_garage_ATACH_istrument_2
0453: object 2@ set_rotation 0.0 0.0 90.0
070A: AS_actor $PLAYER_ACTOR attach_to_object 2@ offset -0.03 0.05 -0.15 on_bone 6 16 perform_animation "NULL" IFP_file "NULL" time 1
wait 1000
06D2: 28@v = "FLAME" 
gosub @LOAD_ANIM_0
0390: load_txd_dictionary "cstuni"  // TXD  -        
038F: request_texture "menubike1" as  20
038F: request_texture "healthbike" as  21
jump @BIKE_garage_PAINT_1

:BIKE_garage_ATACH_istrument_2 //
if
0471: unknown_actor $PLAYER_ACTOR near_object 3@ radius 0.80 0.80 unknown 0
else_jump @BIKE_garage_ATACH_istrument_3
0453: object 3@ set_rotation 0.0 0.0 90.0
070A: AS_actor $PLAYER_ACTOR attach_to_object 3@ offset 0.12 0.0 -0.15 on_bone 6 16 perform_animation "NULL" IFP_file "NULL" time 1
0390: load_txd_dictionary "cstuni"  // TXD  -        
038F: request_texture "menubike1" as  20
038F: request_texture "healthbike" as  21
wait 1000
19@ = 0.0
jump @BIKE_garage_BOLGARKA_1

:BIKE_garage_ATACH_istrument_3 //
if
0471: unknown_actor $PLAYER_ACTOR near_object 5@ radius 0.80 0.80 unknown 0
else_jump @BIKE_garage_ATACH_istrument_4
21@ = actor.Angle($PLAYER_ACTOR)
21@ -= 90.0
0453: object 5@ set_rotation 0.0 0.0 21@
070A: AS_actor $PLAYER_ACTOR attach_to_object 5@ offset 0.12 0.0 -0.15 on_bone 6 0 perform_animation "NULL" IFP_file "NULL" time 1
wait 1000
06D2: 28@v = "COP_AMBIENT" 
gosub @LOAD_ANIM_0
jump @BIKE_garage_KOLESO_1

:BIKE_garage_ATACH_istrument_4 //
if
0471: unknown_actor $PLAYER_ACTOR near_object 7@ radius 0.80 0.80 unknown 0
else_jump @BIKE_garage_ATACH_istrument_99
070A: AS_actor $PLAYER_ACTOR attach_to_object 7@ offset 0.12 0.0 -0.15 on_bone 6 16 perform_animation "NULL" IFP_file "NULL" time 1
wait 1000
06D2: 28@v = "COP_AMBIENT" 
gosub @LOAD_ANIM_0
0390: load_txd_dictionary "cstuni"  // TXD  -        
038F: request_texture "menubike1" as  20
038F: request_texture "healthbike" as  21
jump @BIKE_garage_BOX_1

:BIKE_garage_ATACH_istrument_99
jump @BIKE_garage_1 
//============================
//============================  
//============================
 :BIKE_garage_BOX_1
 wait 0
 if or
 00E1: key_pressed 0 17//fire
 00E1: key_pressed 0 6//aim
 00E1: key_pressed 0 4//fire
 else_jump @BIKE_garage_BOX_2
 010B: 21@ = player $PLAYER_CHAR money 
 if 
 21@ > 10
 else_jump @BIKE_garage_BOX_2
 0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 28@
   if
   056E: 0@
  else_jump @BIKE_garage_BOX_2
  0605: actor $PLAYER_ACTOR perform_animation_sequence "Coplook_think" IFP_file "COP_AMBIENT" 1004.0 loop 0 1 1 0 time -1  // 
   if
   0202:   actor $PLAYER_ACTOR near_car 0@ radius 2.0 2.0 flag 0
  else_jump @BIKE_garage_BOX_2
  0605: actor $PLAYER_ACTOR perform_animation_sequence "Copbrowse_nod" IFP_file "COP_AMBIENT" 1004.0 loop 0 1 1 0 time -1  //   
  0227: 21@ = car 0@ health 
  21@ += 10
  0224: set_car 0@ health_to 21@
  gosub @CAR_HEALTH_menu_garageBIKE_2// 
  player.Money($PLAYER_CHAR) += -10
  0227: 21@ = car 0@ health 
  if
  21@ > 1000
  else_jump @BIKE_garage_BOX_2
  0224: set_car 0@ health_to 1000
  gosub @CAR_HEALTH_menu_garageBIKE_2// 
  player.Money($PLAYER_CHAR) += 10

  :BIKE_garage_BOX_2
 if or
 8471: not unknown_actor $PLAYER_ACTOR near_object 1@ radius 50.0 50.0 unknown 0 -   
 actor.Dead($PLAYER_ACTOR)
 00E1: key_pressed 0 15//EXIT
 else_jump @BIKE_garage_BOX_1
 object.Destroy(7@)
 gosub @BOX_load_1 
 jump @BIKE_garage_1
//============================
//============================  
//============================
 :BIKE_garage_KOLESO_1
wait 0
 if or
 00E1: key_pressed 0 17//fire
 00E1: key_pressed 0 6//aim
 00E1: key_pressed 0 4//fire
 else_jump @BIKE_garage_KOLESO_2
 01B4: toggle_player $PLAYER_CHAR can_move 0 //  
 wait 0
 jump @BIKE_garage_KOLESO_STORONA_0
 
 
 :BIKE_garage_KOLESO_2
 if or
 8471: not unknown_actor $PLAYER_ACTOR near_object 1@ radius 50.0 50.0 unknown 0 //-  
 actor.Dead($PLAYER_ACTOR)
 00E1: key_pressed 0 15//EXIT
 else_jump @BIKE_garage_KOLESO_1
 object.Destroy(5@)
 gosub @KOLESO_load_1 
 jump @BIKE_garage_1
 //=========================================
 //=========================================
 //=========================================
 :BIKE_garage_KOLESO_STORONA_0
  0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 28@
   if
   056E: 0@
  else_jump @BIKE_garage_KOLESO_STORONA_99
   if
   0202:   actor $PLAYER_ACTOR near_car 0@ radius 2.0 2.0 flag 0
  else_jump @BIKE_garage_KOLESO_STORONA_99
  jump @BIKE_garage_KOLESO_STORONA_1
 
  :BIKE_garage_KOLESO_STORONA_1
  0407: store_coords_to 21@ 22@ 23@ from_car 0@ with_offset 0.0 1.50 0.0 
  if and
   00EC:   actor $PLAYER_ACTOR 0 near_point 21@ 22@ radius 1.0 1.0 
   0496: tire 0 on_car 0@ deflated
  else_jump @BIKE_garage_KOLESO_STORONA_2
  gosub @ZAMENA_KOLESA_1
  0227: 22@ = car 0@ health
  object.Destroy(5@)
  0A30: repair_car 0@
  01B4: toggle_player $PLAYER_CHAR can_move 1 //
  0224: set_car 0@ health_to 22@
  gosub @KOLESO_load_1 
  player.Money($PLAYER_CHAR) += -80
  //car.RemoveReferences(0@)
   jump @BIKE_garage_1
  
  :BIKE_garage_KOLESO_STORONA_2
   0407: store_coords_to 21@ 22@ 23@ from_car 0@ with_offset 0.0 -1.50 0.0 
  if and
   00EC:   actor $PLAYER_ACTOR 0 near_point 21@ 22@ radius 1.0 1.0 
   0496: tire 1 on_car 0@ deflated
  else_jump @BIKE_garage_KOLESO_STORONA_99
  //045B: draw_text_2numbers 500.0 335.0 GXT 'number' numbers 1 0
  gosub @ZAMENA_KOLESA_1
  object.Destroy(5@)
  0227: 22@ = car 0@ health
  0A30: repair_car 0@
  01B4: toggle_player $PLAYER_CHAR can_move 1 //
  0224: set_car 0@ health_to 22@
  gosub @KOLESO_load_1
  player.Money($PLAYER_CHAR) += -80 
  //car.RemoveReferences(0@)
   jump @BIKE_garage_1
  
  
  
  :BIKE_garage_KOLESO_STORONA_99
  0605: actor $PLAYER_ACTOR perform_animation_sequence "Coplook_think" IFP_file "COP_AMBIENT" 1004.0 loop 0 1 1 0 time -1  // 
  01B4: toggle_player $PLAYER_CHAR can_move 1 //
  jump @BIKE_garage_KOLESO_2
 
 :ZAMENA_KOLESA_1
0615: define_action_sequences 22@  
0605: actor -1 perform_animation_sequence "Copbrowse_in" IFP_file "COP_AMBIENT" 1004.0 loop 0 1 1 0 time -1  // 
0605: actor -1 perform_animation_sequence "Copbrowse_out" IFP_file "COP_AMBIENT" 1004.0 loop 0 1 1 0 time -1  // 
0616: define_action_sequences_end 22@
0618: assign_actor $PLAYER_ACTOR to_action_sequences 22@ //    
061B: remove_references_to_action_sequences 22@ //       .
return
//============================
//============================  .
//============================
:BIKE_garage_BOLGARKA_1
wait 0
 if or
 00E1: key_pressed 0 17//fire
 00E1: key_pressed 0 6//aim
 00E1: key_pressed 0 4//fire
 else_jump @BIKE_garage_BOLGARKA_2
 010B: 21@ = player $PLAYER_CHAR money 
 if 
 21@ > 10
 else_jump @BIKE_garage_BOLGARKA_2
 01B4: toggle_player $PLAYER_CHAR can_move 0 //   
 03F0: text_draw_toggle  0 //     
 wait 0
0615: define_action_sequences 22@  // .  1@  (      ) 
0605: actor -1 perform_animation_sequence "IDLE_csaw" IFP_file "PED" 1004.0 loop 0 1 1 0 time -1  // 
//0605: actor -1 perform_animation_sequence "IDLE_stance" IFP_file "PED" 1004.0 loop 0 1 1 0 time 2000  //                                        
0616: define_action_sequences_end 22@
0618: assign_actor $PLAYER_ACTOR to_action_sequences 22@ //    
061B: remove_references_to_action_sequences 22@ //       .
                    
 0669: 20@ = attach_particle "prt_spark" to_actor $PLAYER_ACTOR offset 0.15 0.52 0.11 1
 064C: make_particle 20@ visible  
 wait 0
 0650: destroy_particle 20@ 
 19@ += 60.0
 069A: attach_object 4@ to_object 3@ at_offset 0.40 0.0 0.25 rotation 19@ 90.0 90.0
 01B4: toggle_player $PLAYER_CHAR can_move 1 //   
 if
  19@ > 360.0
  else_jump @BIKE_garage_BOLGARKA_3
  19@ = 0.0
 
 :BIKE_garage_BOLGARKA_3 
  0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 28@
   if
   056E: 0@
  else_jump @BIKE_garage_BOLGARKA_2
   if
   0202:   actor $PLAYER_ACTOR near_car 0@ radius 2.0 2.0 flag 0
  else_jump @BIKE_garage_BOLGARKA_2
  gosub @CAR_HEALTH_menu_garageBIKE_2// 
  0227: 22@ = car 0@ health
  22@ += 10
  player.Money($PLAYER_CHAR) += -10
  0224: set_car 0@ health_to 22@
  if
   22@ > 1000
   else_jump @BIKE_garage_BOLGARKA_2
   player.Money($PLAYER_CHAR) += 10
  03F0: text_draw_toggle  0 //     
  wait 0
  0224: set_car 0@ health_to 1000
  gosub @CAR_HEALTH_menu_garageBIKE_2// 
  
 :BIKE_garage_BOLGARKA_2
 010B: 21@ = player $PLAYER_CHAR money 
 if  or
 8471: not unknown_actor $PLAYER_ACTOR near_object 1@ radius 50.0 50.0 unknown 0 
 21@ <= 9
 actor.Dead($PLAYER_ACTOR)
 00E1: key_pressed 0 15//EXIT
 else_jump @BIKE_garage_BOLGARKA_1
 gosub @CAR_HEALTH_menu_garageBIKE_2// 
 wait 1000
 03F0: text_draw_toggle  0 //     
 object.Destroy(4@)
 object.Destroy(3@)
 gosub @BOLGARKA_load_1// 
 jump @BIKE_garage_1
//============================
//============================  .
//============================
 :BIKE_garage_PAINT_1
 wait 0
 if or
 00E1: key_pressed 0 17//fire
 00E1: key_pressed 0 6//aim
 else_jump @BIKE_garage_PAINT_2
 010B: 21@ = player $PLAYER_CHAR money 
 if 
 21@ > 10
 else_jump @BIKE_garage_PAINT_2 
// if and                 //       
// 0491:   actor $PLAYER_ACTOR has_weapon 41
// 02D8:   actor $PLAYER_ACTOR current_weapon == 41  
// else_jump @BIKE_garage_PAINT_2
// 04B8: get_weapon_data_from_actor $PLAYER_ACTOR weapon_group 10 weapon 21@ ammo 22@ model 23@ 
// 22@ -= 1
// 017B: set_actor $PLAYER_ACTOR weapon 21@ ammo_to 22@ 

 01B4: toggle_player $PLAYER_CHAR can_move 0 //   
 0669: 20@ = attach_particle "spraycan" to_actor $PLAYER_ACTOR offset 0.15 0.52 0.11 1
 064C: make_particle 20@ visible  
gosub @GARAGE_EXIST_CAR_1
wait 0 
01B4: toggle_player $PLAYER_CHAR can_move 1// 
0650: destroy_particle 20@ 
if
   056E: 0@
else_jump @BIKE_garage_PAINT_2
03F3: get_car 0@ primary_color_to 21@ secondary_color_to 22@ 
gosub @CAR_HEALTH_menu_garageBIKE_2

player.Money($PLAYER_CHAR) += -10  
010B: 21@ = player $PLAYER_CHAR money 
if
 21@ < 0
 else_jump @BIKE_garage_PAINT_2
player.Money($PLAYER_CHAR) += 10 
gosub @CAR_HEALTH_menu_garageBIKE_2
wait 1000  
 03F0: text_draw_toggle  0 //     
 wait 0
 0391: release_txd_dictionary //  TXD'
 object.Destroy(2@)
 gosub @KRASKOPULT_load_1 //
 jump @BIKE_garage_1
 
 :BIKE_garage_PAINT_2
 010B: 21@ = player $PLAYER_CHAR money 
 if or
  8471: not unknown_actor $PLAYER_ACTOR near_object 1@ radius 50.0 50.0 unknown 0 
 21@ <= 9
 actor.Dead($PLAYER_ACTOR)
 00E1: key_pressed 0 15//EXIT
 else_jump @BIKE_garage_PAINT_1
 03F0: text_draw_toggle  0 //     
 wait 0
 0391: release_txd_dictionary //  TXD'
 object.Destroy(2@)
 gosub @KRASKOPULT_load_1 //
 jump @BIKE_garage_1
 //=======================
 //=======================    1-2
 //=======================
 :GARAGE_EXIST_CAR_1
  wait 0
  0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to 28@
   if
   056E: 0@
  else_jump @GARAGE_EXIST_CAR_99
   if
   0202:   actor $PLAYER_ACTOR near_car 0@ radius 2.0 2.0 flag 0 
  else_jump @GARAGE_EXIST_CAR_99
  
  :GARAGE_EXIST_CAR_2
  0407: store_coords_to 21@ 22@ 23@ from_car 0@ with_offset 1.0 0.0 0.0
  if and
  00E1: key_pressed 0 17//fire
  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 21@ 22@ 23@ radius 1.0 1.0 1.0 
  else_jump @GARAGE_EXIST_CAR_3
  0605: actor $PLAYER_ACTOR perform_animation_sequence "FLAME_fire" IFP_file "FLAME" 1004.0 loop 0 0 0 0 time -1
  03F3: get_car 0@ primary_color_to 21@ secondary_color_to 22@ 
  21@ += 1
  //01E3: text_1number_styled 'DOLLAR' 21@ 2000 ms 4
  0229: set_car 0@ color_to 21@ 22@
   if
   21@ >= 120
   else_jump @GARAGE_EXIST_CAR_99
   0229: set_car 0@ color_to 0 22@
   return
   
   :GARAGE_EXIST_CAR_3
  0407: store_coords_to 21@ 22@ 23@ from_car 0@ with_offset 1.0 0.0 0.0
  if and
  00E1: key_pressed 0 6//fire
  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 21@ 22@ 23@ radius 1.0 1.0 1.0 
  else_jump @GARAGE_EXIST_CAR_4
  0605: actor $PLAYER_ACTOR perform_animation_sequence "FLAME_fire" IFP_file "FLAME" 1004.0 loop 0 0 0 0 time -1
  03F3: get_car 0@ primary_color_to 21@ secondary_color_to 22@ 
  21@ -= 1
  //01E3: text_1number_styled 'DOLLAR' 21@ 2000 ms 4
  0229: set_car 0@ color_to 21@ 22@
   if
   21@ < 0
   else_jump @GARAGE_EXIST_CAR_99
   0229: set_car 0@ color_to 120 22@
   return
   
  :GARAGE_EXIST_CAR_4
  0407: store_coords_to 21@ 22@ 23@ from_car 0@ with_offset -1.0 0.0 0.0
  if and
  00E1: key_pressed 0 17//aim
  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 21@ 22@ 23@ radius 1.0 1.0 1.0 
  else_jump @GARAGE_EXIST_CAR_5
  0605: actor $PLAYER_ACTOR perform_animation_sequence "FLAME_fire" IFP_file "FLAME" 1004.0 loop 0 0 0 0 time -1
  03F3: get_car 0@ primary_color_to 21@ secondary_color_to 22@
  22@ += 1
  //01E3: text_1number_styled 'DOLLAR' 22@ 2000 ms 4
  0229: set_car 0@ color_to 21@ 22@
  if
   22@ >= 120
  else_jump @GARAGE_EXIST_CAR_99
   0229: set_car 0@ color_to 21@ 0
   return
   
   :GARAGE_EXIST_CAR_5
  0407: store_coords_to 21@ 22@ 23@ from_car 0@ with_offset -1.0 0.0 0.0
  if and
  00E1: key_pressed 0 6//fire
  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 21@ 22@ 23@ radius 1.0 1.0 1.0 
  else_jump @GARAGE_EXIST_CAR_99
  0605: actor $PLAYER_ACTOR perform_animation_sequence "FLAME_fire" IFP_file "FLAME" 1004.0 loop 0 0 0 0 time -1
  03F3: get_car 0@ primary_color_to 21@ secondary_color_to 22@
  22@ -= 1
  //01E3: text_1number_styled 'DOLLAR' 22@ 2000 ms 4
  0229: set_car 0@ color_to 21@ 22@
  if
   22@ < 0
  else_jump @GARAGE_EXIST_CAR_99
   0229: set_car 0@ color_to 21@ 120
   return
   
  :GARAGE_EXIST_CAR_99
  return
  //=======================================
:CAR_HEALTH_menu_garageBIKE_0
0227: 22@ = car 0@ health
21@ = 0.0


:CAR_HEALTH_menu_garageBIKE_1
22@ -= 100
21@ += 10.1
03F0: text_draw_toggle  0 //     
wait 0
038D: create_texture  20 position  500.0  470.0 scale  260.0  260.0 color  255  255  255 alpha 255 //    ( ,    )
038D: create_texture  21 position  545.0  374.0 scale  21@  15.0 color  255  255  255 alpha 255 //    ( ,    )
045B: draw_text_2numbers 530.0 368.0 GXT 'number' numbers 22@ 0
if
22@ <= 0
else_jump @CAR_HEALTH_menu_garageBIKE_1
wait 2000

:CAR_HEALTH_menu_garageBIKE_2
03F0: text_draw_toggle  0 //     
wait 0
038D: create_texture  20 position  500.0  470.0 scale  260.0  260.0 color  255  255  255 alpha 255 //    ( ,    )
//038D: create_texture  21 position  545.0  374.0 scale  21@  15.0 color  255  255  255 alpha 255 //    ( ,    )
0227: 22@ = car 0@ health
045B: draw_text_2numbers 530.0 368.0 GXT 'number' numbers 22@ 0

0227: 21@ = car 0@ health
045B: draw_text_2numbers 530.0 368.0 GXT 'number' numbers 21@ 0
03F3: get_car 0@ primary_color_to 21@ secondary_color_to 22@
045B: draw_text_2numbers 490.0 388.0 GXT 'number' numbers 21@ 0
045B: draw_text_2numbers 490.0 402.0 GXT 'number' numbers 22@ 0
0988: get_car 0@ paintjob 21@
045B: draw_text_2numbers 490.0 414.0 GXT 'number' numbers 21@ 0

0AB7: get_vehicle 0@ number_of_gears_to 21@
045B: draw_text_2numbers 549.0 413.0 GXT 'number' numbers 21@ 0

21@ = car.Model(0@)
09E1: get_car_model 21@ price_to 22@ //10000
0227: 27@ = car 0@ health
22@ /= 1000 //  1-   
006A: 27@ *= 22@ // (int)  
045B: draw_text_2numbers 430.0 415.0 GXT 'number' numbers 27@ 0
return
  
//============================
//============================
//============================  
//============================
//============================    #SANCHEZ - 
//============================
07DB: set_car 0@ rotation_velocity_XYZ 0.0 -1.0 0.0 through_center_of_mass
 :CROSS_fristale_0
  wait 0
  
  :CROSS_fristale_1
  wait 0
  if or
  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -2552.54 54.0738 16.5933 radius 10.0 10.0 10.0 //Los Santos
  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2325.7434 -1677.2263 14.4219 radius 10.0 10.0 10.0 //SanFierro
  00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2405.8271 1482.8713 10.8203 radius 10.0 10.0 10.0  //LASVENTURAs
  not actor.Driving($PLAYER_ACTOR)
  else_jump @CROSS_fristale_2
  01B2: give_actor $PLAYER_ACTOR weapon 11@ ammo 12@
  wait 0
  jump @MOTO_ZONE_START_3
  
  :CROSS_fristale_2
  0819: 21@ = actor $PLAYER_ACTOR distance_from_ground 
  if and
  21@ < 2.0
  00E1: key_pressed 0 4//JUMP
  actor.Driving($PLAYER_ACTOR)
  else_jump @CROSS_fristale_3
  03C0: 0@ = actor $PLAYER_ACTOR car 
  24@ = 0.0
  02E3: 21@ = car 0@ speed
  if
  21@ < 5.0
  else_jump @CROSS_JUMP_1
  07D5: set_car 0@ velocity_in_direction_XYZ 0.0 0.0 -0.1 rotation_velocitiesXY 0.0 0.0 unk 0.0
  wait 100
  0574: set_car 0@ keep_position 1
  jump @CROSS_JUMP_1
  
   :CROSS_fristale_3
  0819: 21@ = actor $PLAYER_ACTOR distance_from_ground 
  if and
  actor.Driving($PLAYER_ACTOR)
  21@ > 2.0
  0AB0:   key_pressed 16
  else_jump @CROSS_fristale_1
  //06D2: 28@v = "skate22" 
  //gosub @LOAD_ANIM_0
  //0465: remove_actor $PLAYER_ACTOR from_turret_mode
 //  0605: actor $PLAYER_ACTOR perform_animation_sequence "FALL_skyDive" IFP_file "PED" 1004.0 loop 0 0 0 0 time -1  //                                        
//      wait 0
//0605: actor $PLAYER_ACTOR perform_animation_sequence "FALL_back" IFP_file "PED" 1004.0 loop 0 1 1 0 time -1  //                                        
 07D5: set_car 0@ velocity_in_direction_XYZ 0.0 0.0 0.01 rotation_velocitiesXY 0.0 0.0 unk 0.0
  jump @CROSS_FLY_PRESS_1
  //===========================
  :CROSS_FLY_PRESS_1
  0494: get_joystick 0 data 21@ 22@ 23@ 24@ 
  if  or
  00E1: key_pressed 0 14
  22@ > 0 //
  else_jump @CROSS_FLY_PRESS_2
   0605: actor $PLAYER_ACTOR perform_animation_sequence "FALL_skyDive" IFP_file "PED" 1004.0 loop 0 0 0 0 time -1  //                                        
  jump @CROSS_fristale_1
  
  :CROSS_FLY_PRESS_2
  0494: get_joystick 0 data 21@ 22@ 23@ 24@ 
  if  
  22@ < 0 //
  else_jump @CROSS_FLY_PRESS_3
//  06D2: 28@v = "MD_CHASE" 
//  gosub @LOAD_ANIM_0
//   0605: actor $PLAYER_ACTOR perform_animation_sequence "MD_BIKE_Jmp_BL" IFP_file "MD_CHASE" 1004.0 loop 0 0 0 0 time 500  //                                        
  0605: actor $PLAYER_ACTOR perform_animation_sequence "FALL_back" IFP_file "PED" 1004.0 loop 0 1 1 0 time -1  //                                        

  jump @CROSS_fristale_1
  
  :CROSS_FLY_PRESS_3
  0494: get_joystick 0 data 21@ 22@ 23@ 24@ 
  if
  21@ > 0 //
  else_jump @CROSS_FLY_PRESS_4
//  06D2: 28@v = "TRUCK" 
//  gosub @LOAD_ANIM_0
//   0605: actor $PLAYER_ACTOR perform_animation_sequence "TRUCK_getout_LHS" IFP_file "TRUCK" 1004.0 loop 0 0 0 0 time -1  //                                        
    06D2: 28@v = "MD_CHASE" 
  gosub @LOAD_ANIM_0
   0605: actor $PLAYER_ACTOR perform_animation_sequence "MD_BIKE_Jmp_BL" IFP_file "MD_CHASE" 1004.0 loop 0 0 0 0 time 500  //                                        

  jump @CROSS_fristale_1
  
  :CROSS_FLY_PRESS_4
  0494: get_joystick 0 data 21@ 22@ 23@ 24@ 
  if
  21@ < 0 //
  else_jump @CROSS_fristale_1
  06D2: 28@v = "TRUCK" 
  gosub @LOAD_ANIM_0
   0605: actor $PLAYER_ACTOR perform_animation_sequence "TRUCK_getout_RHS" IFP_file "TRUCK" 1004.0 loop 0 0 0 0 time -1  //                                        
  jump @CROSS_fristale_1
  
  
   //=====================================
  :CROSS_JUMP_1
  07D5: set_car 0@ velocity_in_direction_XYZ 0.0 0.0 -0.05 rotation_velocitiesXY 0.0 0.0 unk 0.0
  wait 0
  if and
  actor.Driving($PLAYER_ACTOR)
  80E1: not key_pressed 0 4
  else_jump @CROSS_JUMP_2
   03C0: 0@ = actor $PLAYER_ACTOR car 
  jump @JUMP_END_1
  
  :JUMP_END_1
  02E3: 21@ = car 0@ speed //-    .
  if //and
   //00E1: key_pressed 0 14
   21@ < 5.0
   else_jump @JUMP_END_2
   0574: set_car 0@ keep_position 0// 
   wait 0
  04BA: set_car 0@ speed_instantly 6.0 //-   .
  jump @JUMP_END_2
  
  :JUMP_END_2
  04C4: store_coords_to 21@ 22@ 23@ from_actor $PLAYER_ACTOR with_offset 0.0 1.0 1.0 
  07D5: set_car 0@ velocity_in_direction_XYZ 0.0 0.0 -0.2 rotation_velocitiesXY 0.0 0.0 unk 0.0
  wait 0
  07D5: set_car 0@ velocity_in_direction_XYZ 0.0 0.0 24@ rotation_velocitiesXY 0.0 0.0 unk 0.0
  07DA: set_car 0@ rotation_velocity_XYZ 10.0 0.0 0.0 through_center_of_body
  wait 0
  car.RemoveReferences(0@)
  jump @CROSS_fristale_2
  
  
  :CROSS_JUMP_2
  if 
  not actor.Driving($PLAYER_ACTOR)
  else_jump @CROSS_JUMP_3
  car.RemoveReferences(0@)
  wait 2000
  jump @MOTO_ZONE_START_1
  
  :CROSS_JUMP_3
   24@ += 0.03
  if
   24@ > 0.3
   else_jump @CROSS_JUMP_1 
  // 0605: actor $PLAYER_ACTOR perform_animation_sequence "BIKEd_Fwd" IFP_file "BIKED" 1004.0 loop 0 0 0 0 time -1  //                                        
   24@ = 0.3
   jump @CROSS_JUMP_1               
  //=====================================
  //=====================================
  //=====================================
  //==================
:LOAD_MODEL_1
model.load(29@)
038B: load_requested_models
:LOAD_MODEL_2
wait 0
if
 model.Available(29@)
 else_jump @LOAD_MODEL_2
 return
 //==================================
:LOAD_ANIM_0 //
04ED: load_animation 28@v

:LOAD_ANIM_1 //   .
wait 0
if
04EE:   animation 28@v loaded    // PED   ,     
else_jump @LOAD_ANIM_1 //     .
return //  