CLEO Help NOP in cleo

CLEO related
Status
Not open for further replies.

Zin

Expert
Joined
Aug 1, 2013
Messages
1,725
Solutions
2
Reaction score
113
How to NOP in cleo I found a NOP opcode

Code:
0000: NOP

But how to NOP like samp patches so like set player pos or NOP Toggle player controllable
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
272
Rather simple, you just need to look in your mod_sa.ini for the address and nop value.


Code:
:A
wait 0
if 
0ab0: 49
jf @A
0B2E: 1@ = read_samp_memory 0x14A70 size 2 // to read and store the original value of address.
0B2D: write samp_memory 0x14A70 value 0xC390 size 2 // to NOP it. = ON.
jump @B

:B
wait 0 
if 
0ab0: 50
jf @B
0B2d: write samp_memory 0x14A70 value 1@ size 2 // to restore original value of address = OFF.
jump @A

Look in mod_sa.ini at SA:MP Patches.
Code:
sampPatch[] = "NOP TogglePlayerControllable"	&0 0 0x14A70  "" "C390"
 

.silent

Well-known member
Joined
Apr 14, 2013
Messages
339
Reaction score
13
Yeah, like springfield said
you need to write specified bytes to a specified address, this will NOP the instruction that for example stands for updating your player data etc.
Size is 2 because you are writing 2 bytes to the address (C390, C3 (first byte) + 90 (second byte))

How do you need to know the size to NOP an instruction ?
Well, its easy.
Lets say you have found a instruction in CE that makes your player die if he blablablabla
The address is like 0x77B77 or w/e, in CE you will see that when its not NOPed it has a value like:
"68C17BC3"
So, we see that it has 4 bytes (1.68 2.C1 3.7B 4.C3)
To NOP it, we need to replace every byte with a NOP so the instruction will do nothing.
So we should write "90909090" to that address to NOP it (well in SA-MP patches there are sometimes other bytes than 90, i dont know why (not experienced enough xD) but for basic things like NOPing the instruction that changes your current hour (hehe) you just replace every byte with 90 and thats all.
 
Status
Not open for further replies.
Top