Resource icon

CLEO Release Auto Pilot

CLEO related
Status
Not open for further replies.

Gorkem

Active member
Joined
Aug 9, 2014
Messages
59
Reaction score
0
Hello,

How To Use ?

Put At AutoPilot.cs Your Cleo Folder.​
Then First Click On Map Your Target Destination And Press P For Enable.​

BUGS​
Maybe..?​

SOURCE​

Code:
{$CLEO}
0000:
0@ = 0
$_P = 0
$_G = 0
$_R = 0
$_B = 0

while true
wait 0
if and  
key_down 80
8B21: 	samp is_chat_opened
then
 if $_P == 0
 then $_P = 1
 0@ = 1
 0AF8: samp add_message_to_chat "[AUTO-PILOT]: Auto Pilot Enabled" color 0x7CFC00
 else $_P = 0
 0@ = 0
 0AF8: samp add_message_to_chat "[AUTO-PILOT]: Auto Pilot Disabled" color 0xFF0000
 $_G = 0
 $_B = 0
 if Actor.Driving($PLAYER_ACTOR)
 then 1@ = Actor.CurrentCar($PLAYER_ACTOR)
 0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 2@ 3@ 4@
 036A: put_actor $PLAYER_ACTOR in_car 1@
 end
 end
 wait 1000
end
if and
 key_down 82
 8B21: 	samp is_chat_opened
then
 if $_R == 0
 then $_R = 1
 0AF8: samp add_message_to_chat "[AUTO-PILOT]: Play Back Enabled" color 0x7CFC00
 else $_R = 0
 0AF8: samp add_message_to_chat "[AUTO-PILOT]: Play Back Disabled" color 0xFF0000
 $_B = 0
 end
 wait 1000
end 
if and
Actor.Driving($PLAYER_ACTOR)
$_P == 1
0AB6: store_target_marker_coords_to 5@ 6@ 7@
$_G == 0 
then
 if or
 04AB:   actor $PLAYER_ACTOR driving_plane
 04A9:   actor $PLAYER_ACTOR driving_heli
 then
 1@ = Actor.CurrentCar($PLAYER_ACTOR)
 00AA: store_car 1@ position_to 2@ 3@ 4@
 if 04AB:   actor $PLAYER_ACTOR driving_plane
 then 04D2: set_plane 1@ fly_autopilot_around_point 5@ 6@ 4@ altitude_between 0.0 and 0.5
 08E6: set_plane 1@ landing_gear 1
 $_G = 1
 else 0743: 04A2: set_heli 1@ fly_to 5@ 6@ 4@ altitude_between 4@ and 4@
 $_G = 1
 end
 0@ = 1
 wait 1000
 end
end
if and
   Actor.Driving($PLAYER_ACTOR)
   0@ == 1
then
 if or
 04AB:   actor $PLAYER_ACTOR driving_plane
 04A9:   actor $PLAYER_ACTOR driving_heli
 then
 1@ = Actor.CurrentCar($PLAYER_ACTOR)
 00AA: store_car 1@ position_to 8@ 9@ 10@
  if $_B == 0
  then 0509: 11@ = distance_between_XY 5@ 6@ and_XY 8@ 9@ 
  else 0509: 11@ = distance_between_XY 8@ 9@ and_XY 2@ 3@
  end
 0AD3: 12@v = format "Distance: %f" 11@
 0ACD: show_text_highpriority 12@v time 1
 if 11@ <= 15.0
 then 
 0ACD: show_text_highpriority "Destination Reached" time 1000
  if $_R == 1
  then
   if $_B == 0
   then $_B = 1
   else $_B = 0
   $_G = 0
   end
   if 04AB:   actor $PLAYER_ACTOR driving_plane
   then 04D2: set_plane 1@ fly_autopilot_around_point 2@ 3@ 4@ altitude_between 0.0 and 0.5
   08E6: set_plane 1@ landing_gear 1
   else 04A2: set_heli 1@ fly_to 2@ 3@ 4@ altitude_between 4@ and 4@
   end
   else
   0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 8@ 9@ 10@
   036A: put_actor $PLAYER_ACTOR in_car 1@
   0@ = 0
   $_G = 0
   $_P = 0
   $_B = 0
   0AF8: samp add_message_to_chat "[AUTO-PILOT]: Auto Pilot Disabled" color 0xFF0000
   continue
  end 
 end
 end
 end
 END

Keys

Code:
P - Enable/Disable Autopilot
R - Enable Playback(Will Drive Back Your First Position)


Working in Plane And Helicopters​

[video=youtube]www.youtube.com/watch?v=Yp7_K-SPdPM[/video]​

Note: Enable When You İn Sky Because Will Be Check Your First altitude​

//NO ATTACHMENT!
Read the RULES.
 
Status
Not open for further replies.
Top