CLEO Help Conditions for memories

CLEO related
Status
Not open for further replies.

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
I just want to ask that how to ask conditions 'if' before read_memory and write_memory , because i try to add if - then - end .... it's crash

-Thanks in advanced  :computer_guy:
 

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
Code:
{$CLEO .cs}
thread 'GRAVITY'
wait 3000
:GRAVITY_1
0A8D: 1@ = read_memory 0x863984   size 4 virtual_protect 1
wait 100
03F0: text_draw_toggle  1
0001: wait  50 ms
03F0: text_draw_toggle  0
0001: wait  50 ms
045A: text_draw_1number  250.0  40.0 'NUMBER' 1@
0A8C: write_memory 0x863984   size 4 value 2 virtual_protect 1 //clear the buffer
0A93: end_custom_thread
Like this example , making ON/OFF with condition ?
 

ThermaL

Expert
Joined
Oct 23, 2013
Messages
1,593
Reaction score
3
Code:
{$CLEO .cs}

0000: NOP
0A8D: 1@ = read_memory 0x863984 size 4 virtual_protect 1

:GRAVITY_ON
wait 0
if
0AB0:
jf @GRAVITY_ON
0A8C: write_memory 0x863984 size 4 value 2 virtual_protect 1 
wait 750
goto @GRAVITY_OFF

:GRAVITY_OFF
wait 0
if
0AB0:
jf @GRAVITY_OFF
0A8C: write_memory 0x863984 size 4 value 1@ virtual_protect 1 
wait 750
goto @GRAVITY_ON
 

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
TH3RM4L link said:
Code:
{$CLEO .cs}

0000: NOP
0A8D: 1@ = read_memory 0x863984 size 4 virtual_protect 1

:GRAVITY_ON
wait 0
if
0AB0:
jf @GRAVITY_ON
0A8C: write_memory 0x863984 size 4 value 2 virtual_protect 1 
wait 750
goto @GRAVITY_OFF

:GRAVITY_OFF
wait 0
if
0AB0:
jf @GRAVITY_OFF
0A8C: write_memory 0x863984 size 4 value 1@ virtual_protect 1 
wait 750
goto @GRAVITY_ON
one thing : why it has to be 'size 4' and value 2 1@ etc.' ?
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
That's a retarded question to ask, since you provided the addres, size and value.

Size = number of bytes to write.
Value = value to write.
1@ = old value
 

DzkAy

Well-known member
Joined
Feb 20, 2014
Messages
472
Reaction score
1
springfield link said:
That's a retarded question to ask, since you provided the addres, size and value.

Size = number of bytes to write.
Value = value to write.
1@ = old value
i get that address example from gtaforums so i don't own and know it well.
btw , thanks
 
Status
Not open for further replies.
Top