CLEO Help OP Surfly hotkey change error

CLEO related
Status
Not open for further replies.

FixmeH

Active member
Joined
Feb 27, 2014
Messages
33
Reaction score
0
Hi, I have opcode's surfly cleo but I'd like to change the hotkeys but it won't work. I get some error on sanny builder even though I didn't touch anything else except the keys. I would like to change the ALT+X activation keys to O+P and the disable key which is X, I want it to be P.


The .cs file is on the attachment, please help me out :C
 

Attachments

  • ]OP[Surfly.cs
    19.9 KB · Views: 75

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
It's messed up because of the thread "$PLAYER_ACTOR" thing, here's the script fixed and compilable.
Code:
// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
thread "$PLAYER_ACTOR" 
0662: printstring "MADE BY OPCODEEXE" 
0662: printstring ":D:D:D:D" 
0662: printstring "WWW.YOUTUBE.COM/TVOPCODEEXE" 

:Label81
wait 0 
if and
key_down 88 
key_down 18 
else_jump @Label81 
29@ = 0 
28@ = 0 
04ED: load_animation "FALL_SKYDIVE" 
0A96: 11@ = actor $PLAYER_ACTOR struct 
0A8E: 3@ = 11@ + 1132 // int 
0A8E: 4@ = 11@ + 1360 // int 
0A8E: 5@ = 11@ + 1364 // int 
018C: play_sound 1083 at 0.0 0.0 0.0 
Actor.SetImmunities($PLAYER_ACTOR, 0, 0, 0, 1, 0)
print "~R~INFO: ~W~ SURFLY ACTIVATED." 2000 

:Label247
wait 0 
if 
   not key_down 88 
else_jump @Label247 

:Label266
if 
   not key_down 88 
else_jump @Label1794 
wait 0 
if 
   not Actor.Dead($PLAYER_ACTOR)
else_jump @Label1345 
if 
   not Actor.Driving($PLAYER_ACTOR)
else_jump @Label1978 
02A9: set_actor $PLAYER_ACTOR immune_to_nonplayer 1 
Actor.SetImmunities($PLAYER_ACTOR, 1, 1, 1, 1, 1)
068D: get_camera_position_to 20@ 21@ 22@ 
068E: get_camera_target_point_to 22@ 23@ 24@ 
0063: 22@ -= 20@ // (float) 
0063: 23@ -= 21@ // (float) 
0604: get_Z_angle_for_point 22@ 23@ store_to 7@ 
Actor.Angle($PLAYER_ACTOR) = 7@
0662: printstring "FYPS SPEECALCULATION" 
083D: get_actor $PLAYER_ACTOR velocity_in_direction_XYZ 8@ 9@ 10@ 
8@ *= 1.001 
9@ *= 1.001 
0A8D: 6@ = read_memory 4@ size 4 virtual_protect 0 
0A8D: 7@ = read_memory 5@ size 4 virtual_protect 0 
6@ *= 15.0 
7@ *= 15.0 
005B: 8@ += 6@ // (float) 
005B: 9@ += 7@ // (float) 
0662: printstring "END" 
if 
key_down 87 
else_jump @Label611 
Actor.StorePos($PLAYER_ACTOR, 20@, 21@, 22@)
04C4: store_coords_to 23@ 24@ 25@ from_actor $PLAYER_ACTOR with_offset 0.0 1.0 0.0 
0063: 23@ -= 20@ // (float) 
0063: 24@ -= 21@ // (float) 
005B: 8@ += 23@ // (float) 
005B: 9@ += 24@ // (float) 

:Label611
if 
key_down 65 
else_jump @Label701 
Actor.StorePos($PLAYER_ACTOR, 20@, 21@, 22@)
04C4: store_coords_to 23@ 24@ 25@ from_actor $PLAYER_ACTOR with_offset -1.0 0.0 0.0 
0063: 23@ -= 20@ // (float) 
0063: 24@ -= 21@ // (float) 
005B: 8@ += 23@ // (float) 
005B: 9@ += 24@ // (float) 

:Label701
if 
key_down 68 
else_jump @Label791 
Actor.StorePos($PLAYER_ACTOR, 20@, 21@, 22@)
04C4: store_coords_to 23@ 24@ 25@ from_actor $PLAYER_ACTOR with_offset 1.0 0.0 0.0 
0063: 23@ -= 20@ // (float) 
0063: 24@ -= 21@ // (float) 
005B: 8@ += 23@ // (float) 
005B: 9@ += 24@ // (float) 

:Label791
if 
key_down 83 
else_jump @Label881 
Actor.StorePos($PLAYER_ACTOR, 20@, 21@, 22@)
04C4: store_coords_to 23@ 24@ 25@ from_actor $PLAYER_ACTOR with_offset 0.0 -1.0 0.0 
0063: 23@ -= 20@ // (float) 
0063: 24@ -= 21@ // (float) 
005B: 8@ += 23@ // (float) 
005B: 9@ += 24@ // (float) 

:Label881
if 
key_down 16 
else_jump @Label1003 
if 
0818:   actor $PLAYER_ACTOR in_air 
else_jump @Label912 

:Label912
Actor.StorePos($PLAYER_ACTOR, 20@, 21@, 22@)
04C4: store_coords_to 23@ 24@ 25@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 -1.0 
0063: 23@ -= 20@ // (float) 
0063: 24@ -= 21@ // (float) 
0063: 25@ -= 22@ // (float) 
005B: 8@ += 23@ // (float) 
005B: 9@ += 24@ // (float) 
005B: 10@ += 25@ // (float) 

:Label1003
if 
key_down 32 
else_jump @Label1028 
10@ += 20.0 

:Label1028
if 
0818:   actor $PLAYER_ACTOR in_air 
else_jump @Label1189 
10@ += 0.2 
if or
key_down 65 
key_down 68 
key_down 83 
key_down 87 
else_jump @Label1182 
04ED: load_animation "FALL_SKYDIVE" 
04ED: load_animation "PARACHUTE" 
0812: AS_actor $PLAYER_ACTOR perform_animation "FALL_SKYDIVE" IFP "PARACHUTE" framedelta 2.0 loopA 0 lockX 0 lockY 0 lockF 0 time 0 // versionB 
018C: play_sound 1131 at 0.0 0.0 0.0 
jump @Label1189 

:Label1182
jump @Label1189 

:Label1189
if 
0818:   actor $PLAYER_ACTOR in_air 
else_jump @Label1222 
10@ += 0.1 
jump @Label1222 

:Label1222
if and
  29@ > 3 
key_down 18 
else_jump @Label1305 
083D: get_actor $PLAYER_ACTOR velocity_in_direction_XYZ 8@ 9@ 10@ 
8@ /= 1.5 
9@ /= 1.5 
10@ /= 1.5 
10@ += 0.4 
29@ = 0 

:Label1305
083C: set_actor $PLAYER_ACTOR velocity_in_direction_XYZ 8@ 9@ 10@ 
0A8C: write_memory 3@ size 1 value 0 virtual_protect 0 
Actor.SetImmunities($PLAYER_ACTOR, 1, 1, 1, 1, 1)

:Label1345
if 
   Actor.Animation($PLAYER_ACTOR) == "KO_SKID_BACK"
else_jump @Label1423 
0812: AS_actor $PLAYER_ACTOR perform_animation "LKUP_LOOP" IFP "ON_LOOKERS" framedelta 2.0 loopA 1 lockX 0 lockY 0 lockF 0 time -1 // versionB 
0687: clear_actor $PLAYER_ACTOR task 

:Label1423
if 
key_down 121 
else_jump @Label1780 
if 
   not Actor.Driving($PLAYER_ACTOR)
else_jump @Label1608 
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to $NO_USE 
if and
  29@ > 20 
056E:   car 0@ defined 
else_jump @Label1780 
04C4: store_coords_to 23@ 24@ 25@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 -1.0 
Car.PutAt(0@, 23@, 24@, 25@)
25@ = Actor.Angle($PLAYER_ACTOR)
wait 0 
036A: put_actor $PLAYER_ACTOR in_car 0@ 
Car.Angle(0@) = 25@
print "[F10] ~R~E~W~NTERED..." 1022 
wait 0 
29@ = 0 
Camera.Restore_WithJumpCut
jump @Label1780 

:Label1608
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to $NO_USE 
if 
056E:   car 0@ defined 
else_jump @Label1780 
if and
  29@ > 20 
   Actor.InCar($PLAYER_ACTOR, 0@)
else_jump @Label1780 
print "[F10] ~R~R~W~EMOVED..." 1022 
04C4: store_coords_to 23@ 24@ 25@ from_actor $PLAYER_ACTOR with_offset 0.0 -1.0 -1.0 
0362: remove_actor $PLAYER_ACTOR from_car_and_place_at 23@ 24@ 25@ 
wait 0 
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to $NO_USE 
if 
056E:   car 0@ defined 
else_jump @Label1771 
099A: set_car 0@ collision_detection 1 

:Label1771
Camera.Restore_WithJumpCut
29@ = 0 

:Label1780
29@ += 1 
jump @Label266 

:Label1794
print "~R~INFO: ~W~ SURFLY DEACTIVATED." 2000 
wait 100 
018C: play_sound 1084 at 0.0 0.0 0.0 
02A9: set_actor $PLAYER_ACTOR immune_to_nonplayer 1 
Actor.SetImmunities($PLAYER_ACTOR, 0, 0, 0, 0, 0)
0687: clear_actor $PLAYER_ACTOR task 
0AB5: store_actor $PLAYER_ACTOR closest_vehicle_to 0@ closest_ped_to $NO_USE 
if 
056E:   car 0@ defined 
else_jump @Label1918 
099A: set_car 0@ collision_detection 1 

:Label1918
wait 20 
   not key_down 88 
else_jump @Label1918 
print "~R~INFO: ~W~ MADE BY OPCODEEXE." 950 
jump @Label81 

:Label1978
0@ = Actor.CurrentCar($PLAYER_ACTOR)
03AB: set_car 0@ strong 1 
099A: set_car 0@ collision_detection 0 
0A30: repair_car 0@ 
01EC: make_car 0@ very_heavy 1 
07DA: set_car 0@ rotation_velocity_XYZ 0.0 0.0 0.0 through_center_of_body 
07DB: set_car 0@ rotation_velocity_XYZ 0.0 0.0 0.0 through_center_of_mass 
068D: get_camera_position_to 20@ 21@ 22@ 
068E: get_camera_target_point_to 22@ 23@ 24@ 
0063: 22@ -= 20@ // (float) 
0063: 23@ -= 21@ // (float) 
0604: get_Z_angle_for_point 22@ 23@ store_to 7@ 
Car.Angle(0@) = 7@
if 
key_down 87 
else_jump @Label2220 
Actor.StorePos($PLAYER_ACTOR, 20@, 21@, 22@)
0407: store_coords_to 23@ 24@ 25@ from_car 0@ with_offset 0.0 0.03 0.0 
0063: 23@ -= 20@ // (float) 
0063: 24@ -= 21@ // (float) 
0063: 25@ -= 22@ // (float) 
07D5: set_car 0@ velocity_in_direction_XYZ 23@ 24@ 25@ rotation_velocitiesXY 0.0 0.0 unk 0.0 

:Label2220
if 
key_down 83 
else_jump @Label2331 
Actor.StorePos($PLAYER_ACTOR, 20@, 21@, 22@)
0407: store_coords_to 23@ 24@ 25@ from_car 0@ with_offset 0.0 -0.03 0.0 
0063: 23@ -= 20@ // (float) 
0063: 24@ -= 21@ // (float) 
0063: 25@ -= 22@ // (float) 
07D5: set_car 0@ velocity_in_direction_XYZ 23@ 24@ 25@ rotation_velocitiesXY 0.0 0.0 unk 0.0 

:Label2331
if 
key_down 65 
else_jump @Label2442 
Actor.StorePos($PLAYER_ACTOR, 20@, 21@, 22@)
0407: store_coords_to 23@ 24@ 25@ from_car 0@ with_offset -0.03 0.0 0.0 
0063: 23@ -= 20@ // (float) 
0063: 24@ -= 21@ // (float) 
0063: 25@ -= 22@ // (float) 
07D5: set_car 0@ velocity_in_direction_XYZ 23@ 24@ 25@ rotation_velocitiesXY 0.0 0.0 unk 0.0 

:Label2442
if 
key_down 68 
else_jump @Label2553 
Actor.StorePos($PLAYER_ACTOR, 20@, 21@, 22@)
0407: store_coords_to 23@ 24@ 25@ from_car 0@ with_offset 0.03 0.0 0.0 
0063: 23@ -= 20@ // (float) 
0063: 24@ -= 21@ // (float) 
0063: 25@ -= 22@ // (float) 
07D5: set_car 0@ velocity_in_direction_XYZ 23@ 24@ 25@ rotation_velocitiesXY 0.0 0.0 unk 0.0 

:Label2553
if 
key_down 32 
else_jump @Label2664 
Actor.StorePos($PLAYER_ACTOR, 20@, 21@, 22@)
0407: store_coords_to 23@ 24@ 25@ from_car 0@ with_offset 0.0 0.0 0.03 
0063: 23@ -= 20@ // (float) 
0063: 24@ -= 21@ // (float) 
0063: 25@ -= 22@ // (float) 
07D5: set_car 0@ velocity_in_direction_XYZ 23@ 24@ 25@ rotation_velocitiesXY 0.0 0.0 unk 0.0 

:Label2664
if 
key_down 16 
else_jump @Label2775 
Actor.StorePos($PLAYER_ACTOR, 20@, 21@, 22@)
0407: store_coords_to 23@ 24@ 25@ from_car 0@ with_offset 0.0 0.0 -0.03 
0063: 23@ -= 20@ // (float) 
0063: 24@ -= 21@ // (float) 
0063: 25@ -= 22@ // (float) 
07D5: set_car 0@ velocity_in_direction_XYZ 23@ 24@ 25@ rotation_velocitiesXY 0.0 0.0 unk 0.0 

:Label2775
if and
  29@ > 6 
key_down 18 
else_jump @Label2807 
Car.SetSpeedInstantly(0@, 0.0)

:Label2807
jump @Label1423
 

FixmeH

Active member
Joined
Feb 27, 2014
Messages
33
Reaction score
0
Gives me this error:
be10d0362a68d39e01a5829b49fc475b.png


Tried other keys too, same thing.

Help?


Edit: Should I add Key_Pressed instead of key_down?
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
Install SF opcodes to SB.
http://ugbase.eu/releases/(plugin)-sampfuncs-3-1-by-fyp-(0-3z)/

For Developers:
- Copy all files from the "SB data" to "/Sanny Builder 3/data/sa".
 
Status
Not open for further replies.
Top