{$CLEO .cs} //    - 
//-------------MAIN---------------
0000:nop   //      -    
wait 6000

:START_2  // 
jump @HOURSE_ZONE_1
//================================
//================================     
//================================
:CREAT_HOURS_1
023c: request_special_actor 'player1' as 1 
gosub @ACTOR_LOAD_SPECIAL_0
actor.create(3@,mission4, #special01, 21@, 22@, 23@)
wait 0
//0296: unload_special_actor 1
29@ = 2749//1974
gosub @LOAD_ID_1
object.Create(4@,29@,21@, 22@, 23@)
//069B: attach_object 4@ to_actor 3@ at_offset 0.0 0.0 0.0 rotation 0.0 0.0 0.0
070A: AS_actor 3@ attach_to_object 4@ offset 0.0 -0.50 0.0 on_bone 16 0 perform_animation "NULL" IFP_file "NULL" time 1 //-     (on_bone 6) 
model.Destroy(29@)
06D2: 28@v = "horse_animation" // @v = string 
gosub @LOAD_ANIM_0
0615: define_action_sequences 21@  // .  1@  (      ) 
0605: actor -1 perform_animation_sequence "horse_idle_1" IFP_file "horse_animation" 1004.0 loop 1 0 0 1 time -1 // versionA
0616: define_action_sequences_end 21@ // 
0618: assign_actor 3@ to_action_sequences 21@ //    
061B: remove_references_to_action_sequences 21@ //       .
04D8: set_actor 3@ drowns_in_water 0
return
//================================
//================================              -=  =-
//================================ ͨ           , 
//================================       .
//================================        .
//================================         .
//================================         .
:HOURSE_ZONE_1 
wait 0
if 
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2494.7937 -1675.745 13.3359 radius 25.0 25.0 25.0 
else_jump @HOURSE_ZONE_2
21@ = 2494.7937
22@ = -1675.745
23@ = 13.3359 
gosub @CREAT_HOURS_1
jump @HOURSE_UP_1

:HOURSE_ZONE_2 // 
wait 0
if 
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 112.0284 -40091.8203 8.6165 radius 50.0 50.0 25.0 // .
else_jump @HOURSE_ZONE_3  //   
21@ = 112.0284   // X-  
22@ = -40091.8203   // Y-  
23@ = 8.6165     // Z-  
gosub @CREAT_HOURS_1
jump @HOURSE_UP_1 

:HOURSE_ZONE_3 // 
wait 0
if 
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere -54.7569 -160.2674 3.1172 radius 50.0 50.0 25.0 // .
else_jump @HOURSE_ZONE_4  //   
21@ = -54.7569   // X-  
22@ = -160.2674   // Y-  
23@ = 3.1172     // Z-  
gosub @CREAT_HOURS_1
jump @HOURSE_UP_1 

:HOURSE_ZONE_4 // 
wait 0
if 
00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 98.9684 139.1184 2.4297 radius 50.0 50.0 25.0 // .
else_jump @HOURSE_ZONE_1  //   
21@ = 98.9684   // X-  
22@ = 139.1184   // Y-  
23@ = 2.4297     // Z-  
gosub @CREAT_HOURS_1
jump @HOURSE_UP_1 
//================================
//================================    
//================================
:HOURSE_UP_1   //  
wait 0
0605: actor 3@ perform_animation_sequence "horse_idle_1" IFP_file "horse_animation" 1004.0 loop 1 0 0 1 time -1 // versionA
if and
 not Actor.Driving($PLAYER_ACTOR)
 00F3:   actor $PLAYER_ACTOR near_actor 3@ radius 2.0 2.0 0 on_foot 
 00E1: key_pressed 0 15//ENTER CAR
 else_jump @HOURSE_UP_2
 jump @HOURSE_TURRET_1

:HOURSE_UP_2  //       
wait 0
if or
 80F2:   not actor $PLAYER_ACTOR near_actor 3@ radius 100.0 100.0 0 
 actor.Dead(3@)
 else_jump @HOURSE_UP_1
 object.RemoveReferences(4@)
 actor.RemoveReferences(3@)
 actor.StorePos($PLAYER_ACTOR,21@,22@,23@)

 :HOURSE_UP_3  //      
 wait 0
 80FE:   not actor $PLAYER_ACTOR sphere 0 in_sphere 21@ 22@ 23@ radius 50.0 50.0 50.0 
 else_jump @HOURSE_UP_3
 wait 1000
 jump @HOURSE_ZONE_1 
//================================
//================================        
//================================
:HOURSE_TURRET_1
04F4: put_actor $PLAYER_ACTOR into_turret_on_object 4@ offset_from_object_origin 1.0 0.0 0.0 orientation 3 both_side_angle_limit 360.0 lock_weapon 0 
wait 0
01B4: toggle_player $PLAYER_CHAR can_move 0 // 0-1 \ 
01B4: toggle_player $PLAYER_CHAR can_move 1 // 0-1 \ 
wait 0
21@ = actor.Angle(3@)
actor.Angle($PLAYER_ACTOR) = 21@
06D2: 28@v = "horse_animation" // @v = string 
gosub @LOAD_ANIM_0
0615: define_action_sequences 21@  // .  1@  (      ) 
0605: actor -1 perform_animation_sequence "jump_on_right" IFP_file "horse_animation" 1004.0 loop 0 0 0 0 time -1 // versionA
0605: actor -1 perform_animation_sequence "sit" IFP_file "horse_animation" 1004.0 loop 0 0 0 1 time -1 // versionA
0616: define_action_sequences_end 21@ // 
0618: assign_actor $PLAYER_ACTOR to_action_sequences 21@ //    
061B: remove_references_to_action_sequences 21@ //       .
wait 1000
04F4: put_actor $PLAYER_ACTOR into_turret_on_object 4@ offset_from_object_origin 0.0 0.0 0.0 orientation 1 both_side_angle_limit 360.0 lock_weapon 0 
01B4: toggle_player $PLAYER_CHAR can_move 0 // 0-1 \ 
01B4: toggle_player $PLAYER_CHAR can_move 1 // 0-1 \ 
21@ = actor.Angle(3@)
actor.Angle($PLAYER_ACTOR) = 21@
0605: actor $PLAYER_ACTOR perform_animation_sequence "sit" IFP_file "horse_animation" 1004.0 loop 0 1 1 1 time -1 // versionA


 :HOURSE_TURRET_2
wait 0
21@ = actor.Angle(3@)
actor.Angle($PLAYER_ACTOR) = 21@
if 
 00E1: key_pressed 0 15//ENTER CAR
 else_jump @HOURSE_TURRET_2a
 04F4: put_actor $PLAYER_ACTOR into_turret_on_object 4@ offset_from_object_origin 1.0 0.0 0.0 orientation 1 both_side_angle_limit 360.0 lock_weapon 0 
01B4: toggle_player $PLAYER_CHAR can_move 0 // 0-1 \ 
01B4: toggle_player $PLAYER_CHAR can_move 1 // 0-1 \ 
 06D2: 28@v = "horse_animation" // @v = string 
gosub @LOAD_ANIM_0
0615: define_action_sequences 21@  // .  1@  (      ) 
0605: actor -1 perform_animation_sequence "exit_right" IFP_file "horse_animation" 1004.0 loop 0 0 0 0 time -1 // versionA
0616: define_action_sequences_end 21@ // 
0618: assign_actor $PLAYER_ACTOR to_action_sequences 21@ //    
061B: remove_references_to_action_sequences 21@ //       .
wait 3000
 0465: remove_actor $PLAYER_ACTOR from_turret_mode  
wait 1000
jump @HOURSE_UP_1

:HOURSE_TURRET_2a
if 
 actor.Dead(3@)
 else_jump @HOURSE_TURRET_3
04F4: put_actor $PLAYER_ACTOR into_turret_on_object 4@ offset_from_object_origin 1.0 0.0 1.0 orientation 1 both_side_angle_limit 360.0 lock_weapon 0 
01B4: toggle_player $PLAYER_CHAR can_move 0 // 0-1 \ 
01B4: toggle_player $PLAYER_CHAR can_move 1 // 0-1 \ 
 06D2: 28@v = "horse_animation" // @v = string 
gosub @LOAD_ANIM_0
0615: define_action_sequences 21@  // .  1@  (      ) 
0605: actor -1 perform_animation_sequence "exit_back" IFP_file "horse_animation" 1004.0 loop 0 0 0 0 time -1 // versionA
0616: define_action_sequences_end 21@ // 
0618: assign_actor $PLAYER_ACTOR to_action_sequences 21@ //    
061B: remove_references_to_action_sequences 21@ //       .
wait 3000
 0465: remove_actor $PLAYER_ACTOR from_turret_mode  
wait 1000
jump @HOURSE_UP_1

:HOURSE_TURRET_3
0494: get_joystick 0 data 28@ 29@ 30@ 31@ 
if and
 80E1: not key_pressed 0 18 //
 80E1: not key_pressed 0 16 //
 29@ < 0
 else_jump @HOURSE_TURRET_3a
//0812: AS_actor 3@ perform_animation "horse_run" IFP_file "horse_animation" 1.0 loopA 0 lockX 1 lockY 1 lockF 0 time -1
0615: define_action_sequences 21@  // .  1@  (      ) 
//0812: AS_actor -1 perform_animation "horse_run" IFP_file "horse_animation" 4.0 loopA 0 lockX 1 lockY 1 lockF 0 time -1
0605: actor -1 perform_animation_sequence "horse_run" IFP_file "horse_animation" 9.0 loop 0 1 1 0 time -1 // versionA
0605: actor -1 perform_animation_sequence "horse_idle_1" IFP_file "horse_animation" 1004.0 loop 1 1 1 0 time -1 // versionA
0616: define_action_sequences_end 21@ // 
0618: assign_actor 3@ to_action_sequences 21@ //    
061B: remove_references_to_action_sequences 21@ //       .
0494: get_joystick 0 data 28@ 29@ 30@ 31@
0605: actor $PLAYER_ACTOR perform_animation_sequence "sit_run" IFP_file "horse_animation" 4004.0 loop 0 1 1 1 time -1 // versionA


:HOURSE_TURRET_3a
if and
 29@ < 0
 00E1: key_pressed 0 16//SPRInT -
else_jump @HOURSE_TURRET_3b
0615: define_action_sequences 21@  // .  1@  (      ) 
//0812: AS_actor -1 perform_animation "horse_sprint" IFP_file "horse_animation" 1.0 loopA 0 lockX 1 lockY 1 lockF 0 time -1
0605: actor -1 perform_animation_sequence "horse_sprint" IFP_file "horse_animation" 1004.0 loop 0 1 1 0 time -1 // versionA
0605: actor -1 perform_animation_sequence "horse_idle_1" IFP_file "horse_animation" 1004.0 loop 1 1 1 0 time -1 // versionA
0616: define_action_sequences_end 21@ // 
0618: assign_actor 3@ to_action_sequences 21@ //    
061B: remove_references_to_action_sequences 21@ //       .
0605: actor $PLAYER_ACTOR perform_animation_sequence "sit_galop" IFP_file "horse_animation" 4004.0 loop 0 1 1 1 time -1 // versionA


:HOURSE_TURRET_3b
0494: get_joystick 0 data 28@ 29@ 30@ 31@ 
if and
 00E1: key_pressed 0 18  //
 29@ < 0
 else_jump @HOURSE_TURRET_4
//0812: AS_actor 3@ perform_animation "horse_run" IFP_file "horse_animation" 1.0 loopA 0 lockX 1 lockY 1 lockF 0 time -1
0615: define_action_sequences 21@  // .  1@  (      ) 
//0812: AS_actor -1 perform_animation "horse_walk" IFP_file "horse_animation" 1.0 loopA 0 lockX 1 lockY 1 lockF 0 time -1
0605: actor -1 perform_animation_sequence "horse_walk" IFP_file "horse_animation" 1004.0 loop 0 1 1 0 time -1 // versionA
0605: actor -1 perform_animation_sequence "horse_idle_1" IFP_file "horse_animation" 1004.0 loop 1 1 1 0 time -1 // versionA
0616: define_action_sequences_end 21@ // 
0618: assign_actor 3@ to_action_sequences 21@ //    
061B: remove_references_to_action_sequences 21@ //       .
0605: actor $PLAYER_ACTOR perform_animation_sequence "sit_walk" IFP_file "horse_animation" 4004.0 loop 0 1 1 1 time -1 // versionA



//0605: actor 3@ perform_animation_sequence "horse_run" IFP_file "horse_animation" 4004.0 loop 0 0 0 1 time -1 // versionA
//0812: AS_actor 3@ perform_animation "horse_walk" IFP_file "horse_animation" 1.0 loopA 0 lockX 0 lockY 0 lockF 1 time 15
//0605: actor $PLAYER_ACTOR perform_animation_sequence "sit_run" IFP_file "horse_animation" 4004.0 loop 0 0 0 1 time -1 // versionA

 
 :HOURSE_TURRET_4
if
 29@ > 0
 else_jump @HOURSE_TURRET_5
0605: actor 3@ perform_animation_sequence "horse_kick_forward" IFP_file "horse_animation" 4004.0 loop 0 1 1 1 time -1 // versionA
//0605: actor $PLAYER_ACTOR perform_animation_sequence "sit_galop" IFP_file "horse_animation" 4004.0 loop 0 0 0 1 time -1 // versionA

 
 :HOURSE_TURRET_5
if
 28@ < 0
 else_jump @HOURSE_TURRET_6
//0605: actor 3@ perform_animation_sequence "horse_walk" IFP_file "horse_animation" 4004.0 loop 0 0 0 1 time -1 // versionA
21@ = actor.Angle(3@)
21@ += 10.0
actor.Angle(3@) = 21@
actor.Angle($PLAYER_ACTOR) = 21@
 
 :HOURSE_TURRET_6
if
 28@ > 0
 else_jump @HOURSE_TURRET_99
// 0605: actor 3@ perform_animation_sequence "horse_walk" IFP_file "horse_animation" 4004.0 loop 0 0 0 1 time -1 // versionA
21@ = actor.Angle(3@)
21@ -= 10.0
actor.Angle(3@) = 21@
actor.Angle($PLAYER_ACTOR) = 21@

//:HOURSE_TURRET_7
//0494: get_joystick 0 data 28@ 29@ 30@ 31@ 
//if and
// 80E1: not key_pressed 0 18 //
// 80E1: not key_pressed 0 16 //
// 29@ == 0
// 29@ == 0
// 28@ == 0
// 28@ == 0
// else_jump @HOURSE_TURRET_99
//0615: define_action_sequences 21@  // .  1@  (      ) 
//0605: actor -1 perform_animation_sequence "horse_idle" IFP_file "horse_animation" 1004.0 loop 1 0 0 0 time -1 // versionA
//0605: actor -1 perform_animation_sequence "horse_idle_1" IFP_file "horse_animation" 1004.0 loop 1 0 0 0 time -1 // versionA
//0616: define_action_sequences_end 21@ // 
//0618: assign_actor 3@ to_action_sequences 21@ //    
//061B: remove_references_to_action_sequences 21@ //       .

:HOURSE_TURRET_99
jump @HOURSE_TURRET_2
//===============================================
//========= ===========================
//===============================================
:LOAD_ID_1
Model.Load(29@)//
038B: load_requested_models 
:load_id_2
wait 0
if
 model.Available(29@)
else_jump @load_id_2
return 

//=================================================
//=================================================
//=================================================
:ACTOR_LOAD_SPECIAL_0
038b: load requested models   //     .
 
:ACTOR_LOAD_SPECIAL_1
wait 0
if
 823D:   not special_actor 1 loaded  //   1   
else_jump @ACTOR_LOAD_SPECIAL_2
return

:ACTOR_LOAD_SPECIAL_2
//01E3: text_1number_styled 'DOLLAR' 20@ 5000 ms 4
//09C7: change_player $PLAYER_CHAR model_to #SPECIAL01
//0296: unload_special_actor 1
//06D2: 29@v = "MKq" // @v = string
//gosub @LOAD_ANIM_0 
return
//========================================================================
//==============      ===========================
//========================================================================
:LOAD_ANIM_0 //   mkq
04ED: load_animation 28@v


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

:LOAD_ANIM_2
if
84ED:   not load_animation 28@v
else_jump @LOAD_ANIM_1 //     .
return // 
//  :
//
//horse_idle                             ,   
//horse_idle_1                          
//horse_kick_forward                ,  ,      ))))
//horse_walk                          
//horse_run                           
//horse_sprint                         (           )
//
//  :
//
//jump_on_left                         
//jump_on_right                       
//exit_left                              
//exit_right                            
//sit                                        
//sit_walk                                   
//sit_run                                     
//sit_galop                                   
//exit_back                                 
// 