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)