Код Чистый
Код
{$CLEO .cs}
0000:
IF
8AAB: file_exists "CLEO\WaTTiProject.ini"
then
0AF3: write_float 1.5 to_ini_file "cleo\WaTTiProject.ini" section "OTHER" key "airbPOS"
end
cmd "airp" @airvelocity
cmd "airb" @airon
while true
wait 0
if 0@ == 1
then
0AF2: 14@ = get_float_from_ini_file "cleo\WaTTiProject.ini" section "OTHER" key "AIRBPOS"
00A0: $PLAYER_ACTOR 6@ 7@ 8@
call @GET_AIMING_POS 0 9@ 10@ 11@
0AB1: call_scm_func @getZAngleBetweenPoints 4 from_XY 6@ 7@ and_XY 9@ 10@ store_to 12@
12@ += -180.0
0173: set_actor $PLAYER_ACTOR Z_angle_to 12@
8@ += -0.5
if key_down 87 // adelante
then
04C4: store_coords_to 6@ 7@ 8@ from_actor $PLAYER_ACTOR with_offset 0.0 14@ 0.0
call @teleport 4 $PLAYER_ACTOR 6@ 7@ 8@
end
if key_down 83 // atras
then
14@ *= -1.0
04C4: store_coords_to 6@ 7@ 8@ from_actor $PLAYER_ACTOR with_offset 0.0 14@ 0.0
call @teleport 4 $PLAYER_ACTOR 6@ 7@ 8@
end
if key_down 68 // derecha
then
04C4: store_coords_to 6@ 7@ 8@ from_actor $PLAYER_ACTOR with_offset 14@ 0.0 0.0
call @teleport 4 $PLAYER_ACTOR 6@ 7@ 8@
end
if key_down 65 // izq
then
14@ *= -1.0
04C4: store_coords_to 6@ 7@ 8@ from_actor $PLAYER_ACTOR with_offset 14@ 0.0 0.0
call @teleport 4 $PLAYER_ACTOR 6@ 7@ 8@
end
if key_down 38 // arriba
then
04C4: store_coords_to 6@ 7@ 8@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 14@
call @teleport 4 $PLAYER_ACTOR 6@ 7@ 8@
end
if key_down 40 // abajo
then
14@ *= -1.0
04C4: store_coords_to 6@ 7@ 8@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 14@
call @teleport 4 $PLAYER_ACTOR 6@ 7@ 8@
end
04D7: set_actor $PLAYER_ACTOR locked 1
end
end
:airon
wait 0
if 0@ == 0
then
0@ = 1
0619: enable_actor $PLAYER_ACTOR collision_detection 0
04D7: set_actor $PLAYER_ACTOR locked 1
chatmsg "{27c8f9}[WaTTi]{ffffff}AIRBREAK ON" -1
else
04D7: set_actor $PLAYER_ACTOR locked 0
0619: enable_actor $PLAYER_ACTOR collision_detection 1
chatmsg "{27c8f9}[WaTTi]{ffffff}AIRBREAK OFF" -1
0@ = 0
end
cmdret
:airvelocity
wait 0
4@ = 0
0B35: samp 4@ = get_last_command_params
if 0AD4: 4@ = scan_string 4@ format "%f" 5@
then
0AF3: write_float 5@ to_ini_file "cleo\WaTTiProject.ini" section "OTHER" key "airbPOS"
chatmsg "{27c8f9}[WaTTi]{ffffff}Velocidad de {ff3c31} %f {ffffff}metros" -1 5@
4@ = 0
5@ = 0
else chatmsg "{27c8f9}[WaTTi]{ffffff}Usa /airp 1.0-2.0-3.0 etc" -1
end
4@ = 0
5@ = 0
cmdret
:TELEPORT
0A96: 4@ = actor 0@ struct
4@ += 20
0A8D: 4@ = read_memory 4@ size 4 virtual_protect 0
4@ += 48 // X
0A8C: write_memory 4@ size 4 value 1@ virtual_protect 0 // X
4@ += 4 // Y
0A8C: write_memory 4@ size 4 value 2@ virtual_protect 0 // Y
4@ += 4 // Z
0A8C: write_memory 4@ size 4 value 3@ virtual_protect 0 // Z
ret 0
:getZAngleBetweenPoints
0063: 0@ -= 2@
0063: 1@ -= 3@
0604: get_Z_angle_for_point 0@ 1@ store_to 4@
0AB2: ret 1 4@
:GET_AIMING_POS // PASTE THIS AT THE END OF THE SCRIPT
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
0A9F: 5@ = current_thread_pointer
5@ += 80
0A8E: 6@ = 5@ + 12 // int
0AA6: call_method 5327216 11989032 num_params 6 pop 0 6@ 5@ 3@ 2@ 1@ 4@
if
86BD: not no_obstacles_between 1@ 2@ 3@ and 8@ 9@ 10@ solid 1 car 1 actor 0 object 1 particle 0
else_jump @ADD
jump @END_POS
:ADD
4@ += 1.0
if
4@ > 450.0
else_jump @GET_AIMING_POS
:END_POS
0@ = 0.0
1@ = 0.0
2@ = 0.0
005B: 0@ += 8@ // (float)
005B: 1@ += 9@ // (float)
005B: 2@ += 10@ // (float)
4@ = 0.0 // RESET THE AIM RADIUS
ret 3 0@ 1@ 2@