CLEO Help Add an deactivation key/

CLEO related
Status
Not open for further replies.

Astron

New member
Joined
Nov 1, 2017
Messages
4
Reaction score
0
Hy,

I need an deactivation key in this script. Can someone help me?
Now the cheat is activated when I type JUMP. 
How to deactivate it when I type it again?

Code:
thread 'CHEAT' 

:CHEAT_11
wait 0 
0A8D: 1@ = read_memory 9867536 size 4 virtual_protect 0 
if 
04A4:   1@ == 1247104336 // == constant 
jf @CHEAT_11 
03E5: show_text_box 'CHEAT1'  // Cheat activated
0A8C: write_memory 9867536 size 4 value 0 virtual_protect 0 
0A8C: write_memory 9867628 size 4 value 1 virtual_protect 0 
0A93: end_custom_thread

__________________________________________________

With this mod I can jump with a car. The problem is, that
the car also jumps when I type something in chat.
Is it possible to deactivate in when the chat is opened?

Code:
thread 'CARJUMP' 

:CARJUMP_11
wait 0 
if and
   Player.Defined($PLAYER_CHAR)
   Actor.Driving($PLAYER_ACTOR)
84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle 
0AB0:   key_pressed 16 
else_jump @CARJUMP_11 
if 
8AB0:   not key_pressed 88 
else_jump @CARJUMP_124 
if 
8AB0:   not key_pressed 67 
else_jump @CARJUMP_145 
1@ = 0.15 
$2657 = 18 
04F7: status_text $2657 type 1 line 1 GXT '' // global_variable 
059C: enable_status_text $2657 flashing 0 // global_variable 
jump @CARJUMP_166 

:CARJUMP_124
wait 0 
1@ = 0.45 
jump @CARJUMP_368 

:CARJUMP_145
wait 0 
1@ = 0.75 
jump @CARJUMP_368 

:CARJUMP_166
wait 0 
0087: 2@ = 1@ // (float) 
2@ *= 133.3333 
0090: $2657 = float 2@ to_integer 
if 
   Actor.Driving($PLAYER_ACTOR)
else_jump @CARJUMP_564 
if 
8AB0:   not key_pressed 9 
else_jump @CARJUMP_280 
if 
0AB0:   key_pressed 16 
else_jump @CARJUMP_337 
if 
  0.75 > 1@ 
else_jump @CARJUMP_166 
1@ += 0.02 
jump @CARJUMP_166 

:CARJUMP_280
wait 100 
if 
   Actor.Driving($PLAYER_ACTOR)
else_jump @CARJUMP_564 
if 
0AB0:   key_pressed 16 
else_jump @CARJUMP_337 
if 
0AB0:   key_pressed 9 
else_jump @CARJUMP_280 
jump @CARJUMP_166 

:CARJUMP_337
wait 0 
0151: remove_status_text $2657 
if 
8AB0:   not key_pressed 82 
else_jump @CARJUMP_11 
jump @CARJUMP_368 

:CARJUMP_368
wait 0 
0@ = Actor.CurrentCar($PLAYER_ACTOR)
if or
81F3:   not car 0@ in_air 
04A7:   actor $PLAYER_ACTOR driving_boat 
else_jump @CARJUMP_11 
0407: store_coords_to 11@ 12@ 13@ from_car 0@ with_offset 0.0 0.0 1@ 
0407: store_coords_to 14@ 15@ 16@ from_car 0@ with_offset 0.0 0.0 0.0 
0063: 11@ -= 14@ // (float) 
0063: 12@ -= 15@ // (float) 
0063: 13@ -= 16@ // (float) 
07D5: set_car 0@ velocity_in_direction_XYZ 11@ 12@ 13@ rotation_velocitiesXY 0.0 0.0 unk 0.0 
if 
04A7:   actor $PLAYER_ACTOR driving_boat 
else_jump @CARJUMP_11 
0087: 3@ = 1@ // (float) 
3@ *= 5000.0 
0092: 4@ = float 3@ to_integer 
wait 4@ 
jump @CARJUMP_11 

:CARJUMP_564
wait 0 
0151: remove_status_text $2657 
jump @CARJUMP_11


Greedings
 

_=Gigant=_

Well-known member
Joined
Mar 21, 2017
Messages
353
Reaction score
16
Astron said:
With this mod I can jump with a car. The problem is, that
the car also jumps when I type something in chat.
Is it possible to deactivate in when the chat is opened?

not SAMP.ChatInputOpened()
 

noob213

Active member
Joined
Sep 15, 2017
Messages
88
Reaction score
6
jump cleo

Code:
{$CLEO}
0000: 
0A8D: 0@ = read_memory 9867536 size 4 virtual_protect 0 
0A8D: 1@ = read_memory 9867628 size 4 virtual_protect 0 

:Noname_30
0001: wait 0 ms 
00D6: if 
0ADC:   test_cheat "jump" 
004D: jump_if_false @Noname_30 
03E5: show_text_box 'CHEAT1'  // Cheat activated
0A8C: write_memory 9867536 size 4 value 0 virtual_protect 0 
0A8C: write_memory 9867628 size 4 value 1 virtual_protect 0 
0002: jump @Noname_97 

:Noname_97
0001: wait 0 ms 
00D6: if 
0ADC:   test_cheat "jump" 
004D: jump_if_false @Noname_97 
03E5: show_text_box 'CHEAT8'  // Cheat deactivated
0A8C: write_memory 9867536 size 4 value 1@ virtual_protect 0 
0A8C: write_memory 9867628 size 4 value 0@ virtual_protect 0 
0002: jump @Noname_30
 

Astron

New member
Joined
Nov 1, 2017
Messages
4
Reaction score
0
_=Gigant=_ said:
Astron said:
With this mod I can jump with a car. The problem is, that
the car also jumps when I type something in chat.
Is it possible to deactivate in when the chat is opened?

not SAMP.ChatInputOpened()

I get Unknown Directive: SAMP.ChatInputOpened().

I have it like this now:
Code:
:CARJUMP_11
wait 0 
if and
   Player.Defined($PLAYER_CHAR)
   Actor.Driving($PLAYER_ACTOR)
84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle 
0AB0:   key_pressed 114
not SAMP.ChatInputOpened()

Whats wrong?
 

_=Gigant=_

Well-known member
Joined
Mar 21, 2017
Messages
353
Reaction score
16
idk maybe u dont have required sf data files from bin i compiled it without error

[attachment=5153]
 

Attachments

  • test.cs
    17.4 KB · Views: 19

Astron

New member
Joined
Nov 1, 2017
Messages
4
Reaction score
0
_=Gigant=_ said:
idk maybe u dont have required sf data files from bin i compiled it without error

:motherofgod: 
uhm so could u compile this code for me? 
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 'CARJUMP' 

:CARJUMP_11
wait 0 
if and
   Player.Defined($PLAYER_CHAR)
   Actor.Driving($PLAYER_ACTOR)
84C8:   not actor $PLAYER_ACTOR driving_flying_vehicle 
0AB0:   key_pressed 16
not SAMP.ChatInputOpened() 
jf @CARJUMP_11 
if 
8AB0:   not key_pressed 88 
jf @CARJUMP_124 
if 
8AB0:   not key_pressed 67 
jf @CARJUMP_145 
1@ = 0.15 
$2657 = 18 
04F7: status_text $2657 type 1 line 1 GXT '' // global_variable 
059C: enable_status_text $2657 flashing 0 // global_variable 
jump @CARJUMP_166 

:CARJUMP_124
wait 0 
1@ = 0.45 
jump @CARJUMP_368 

:CARJUMP_145
wait 0 
1@ = 0.75 
jump @CARJUMP_368 

:CARJUMP_166
wait 0 
0087: 2@ = 1@ // (float) 
2@ *= 133.3333 
0090: $2657 = float 2@ to_integer 
if 
   Actor.Driving($PLAYER_ACTOR)
jf @CARJUMP_564 
if 
8AB0:   not key_pressed 9 
jf @CARJUMP_280 
if 
0AB0:   key_pressed 16
not SAMP.ChatInputOpened() 
jf @CARJUMP_337 
if 
  0.75 > 1@ 
jf @CARJUMP_166 
1@ += 0.02 
jump @CARJUMP_166 

:CARJUMP_280
wait 100 
if 
   Actor.Driving($PLAYER_ACTOR)
jf @CARJUMP_564 
if 
0AB0:   key_pressed 16
not SAMP.ChatInputOpened() 
jf @CARJUMP_337 
if 
0AB0:   key_pressed 9 
jf @CARJUMP_280 
jump @CARJUMP_166 

:CARJUMP_337
wait 0 
0151: remove_status_text $2657 
if 
8AB0:   not key_pressed 82 
jf @CARJUMP_11 
jump @CARJUMP_368 

:CARJUMP_368
wait 0 
0@ = Actor.CurrentCar($PLAYER_ACTOR)
if or
81F3:   not car 0@ in_air 
04A7:   actor $PLAYER_ACTOR driving_boat 
jf @CARJUMP_11 
0407: store_coords_to 11@ 12@ 13@ from_car 0@ with_offset 0.0 0.0 1@ 
0407: store_coords_to 14@ 15@ 16@ from_car 0@ with_offset 0.0 0.0 0.0 
0063: 11@ -= 14@ // (float) 
0063: 12@ -= 15@ // (float) 
0063: 13@ -= 16@ // (float) 
07D5: set_car 0@ velocity_in_direction_XYZ 11@ 12@ 13@ rotation_velocitiesXY 0.0 0.0 unk 0.0 
if 
04A7:   actor $PLAYER_ACTOR driving_boat 
jf @CARJUMP_11 
0087: 3@ = 1@ // (float) 
3@ *= 5000.0 
0092: 4@ = float 3@ to_integer 
wait 4@ 
jump @CARJUMP_11 

:CARJUMP_564
wait 0 
0151: remove_status_text $2657 
jump @CARJUMP_11
 
Status
Not open for further replies.
Top