CLEO Help How to use memory addresses for cleo scripting.

CLEO related
Status
Not open for further replies.

@WZ

Active member
Joined
Aug 3, 2014
Messages
25
Reaction score
1
Hello, i came to ask if somebody can make tutorial on how to use memory addresses, read_memory, write_memory and things like that. It would be great thx.
 

Opcode.eXe

Expert
Joined
Feb 18, 2013
Messages
1,486
Reaction score
227
Location
( ͡° ͜ʖ ͡°)
At first you need a Memory Adress. You can search them by yourself with Cheat Engine, or you just look them up on: http://www.gtamodding.com/?title=Memory_Addresses_%28SA%29

Lets take this one:
0x863984 - [float] Gravity (default value: 1.0f/125.0f = 0.00

There are two opcodes for memory stuffs:
0A8C: write_memory 0x0 size 4 value 1 virtual_protect 0
0A8D: 0@ = read_memory 0x0 size 4 virtual_protect 0

Lets say you're making a CLEO to change the gravity but you dont have a opcode like this:
0000: set_gravity_to 0.0

Thats why you need write memory now!
0x863984 is a FLOAT
FLOAT has the size of 4
->
0A8C: write_memory 0x863984 size 4 value 0.0 virtual_protect 0
Now the gravity will be 0.0 and everything will fly away.
->
0A8C: write_memory 0x863984 size 4 value 0.008 virtual_protect 0
Now the Gravity is back to normal, 0.008 is the default gravity in sa.

Reading out the gravity with memory:

0A8D: 0@ = read_memory 0x863984 size 4 virtual_protect 0

0@ is now the value of adress 0x863984 ( gravity)
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
opcode thank you for responding my pm

but you just copy paste lel
we need real tutorial  :me_gusta:


well, it is looks like i have to learn MC and make a tut for it  :eek:key:
 

monday

Expert
Joined
Jun 23, 2014
Messages
1,125
Reaction score
151
Thank you that's helpful. Written with straightforward language so it's easy to understand unlike the complex tutorial in the link. Btw what does "virtual protect 0" stand for?
I've checked the site with a list of memory addresses, some of them are marked as float/dword/byte/bool/word/hex/char/boolean. How to know which type requires what size to be read? And what about unassigned addresses, is there any way to find out what size has to be read for them? Is it possible to have an inpact on the server's gameplay by replacing some memory addresses?
 
Status
Not open for further replies.
Top