CLEO Help Is this thing possible?

CLEO related
Status
Not open for further replies.

iVilux

Well-known member
Joined
Nov 12, 2013
Messages
207
Reaction score
5
So, I saw a guy on forums that did some NOP without SAMP Functions I think. So it is possible to NOP something in CLEO without SAMP Functions or s0beit?
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
What's not detailed?
Ex. of NOP without sampfuncs.

Code:
0AA2: 0@ = load_library "samp.dll" 
0@ += 0x14A70 //nopPlayerControllable                   
0A8C: write_mem 0@ size 4 value 0xC390 vp 1
 

iVilux

Well-known member
Joined
Nov 12, 2013
Messages
207
Reaction score
5
What's not detailed?
Ex. of NOP without sampfuncs.

Code:
0AA2: 0@ = load_library "samp.dll" 
0@ += 0x14A70 //nopPlayerControllable                   
0A8C: write_mem 0@ size 4 value 0xC390 vp 1
Ok, thanks. Size is 4, so if instead of 0xC390 it is 0xC390C390 it will be 8? When do I need to use virtual_protect (vp)? And how do I unNOP it? :( :(:( Sorry for a shitload of questions.
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
[quote author="springfield"]What's not detailed?
Ex. of NOP without sampfuncs.
Ok, thanks. Size is 4, so if instead of 0xC390 it is 0xC390C390 it will be 8? When do I need to use virtual_protect (vp)? And how do I unNOP it? :( :(:( Sorry for a shitload of questions.[/quote]

I putted a random number, i don't even know that's the correct NOP address.
So, to answer your questions.
1. VP = 1 is for read only adresses, VP = 0 is for rewritable adresses
NOPs = virtual_protect 1, wallhack = virtual_protect 0.
2. Read the memory and store the result to a variable before setting its value to 0xC390.
Here's a mini example of on/off.

Code:
while true
wait 0
if 0AB0: 49 // ON
then
    0AD1: "nop on" time 1000
    0AA2: 0@ = load_library "samp.dll" // IF and SET
    000A: 0@ += 0x14A70 //NOP
    0A8D: 1@ = read_mem 0@ size 2 vp 0 // 1@ = oldValue              
    0A8C: write_memory 0@ size 2 value 0xC390 vp 1 //nopValue
else
    if 0AB0: 50 // OFF
    then
        0AD1: "nop off" time 1000
        0A8C: write_memory 0@ size 2 value 1@ vp 0 //oldValue
    end
end
end
 

Edd004

Active member
Joined
Mar 10, 2013
Messages
155
Reaction score
0
i tried that method to use "Prevent SetPlayerPos"  :forever_hurra: it work but when i want to move far away or turn it OFF, i got crash  :bawww:

this is how i script  :dont_care:
Code:
{$CLEO .cs}
thread "SetPlayerPos"
//patch[] = "Prevent SetPlayerPos"			&0 0 "" 0x005E4110 "568BF1" "C21000"

wait 444
2@ = 0
const
PSP = 0@
CHEAT_ = 2@
end

:A
wait 0


if
cheat "psp"
jf @A
if
CHEAT_ == 0
then
CHEAT_ = 1
PSP = 0x005E4110
0A8D: 1@ = read_memory PSP size 4 virtual_protect 0
0A8C: write_memory PSP size 4 value 0xC21000 virtual_protect 0
text "NOP SetPlayerPos" 2000
else
CHEAT_ = 0
0A8C: write_memory PSP size 4 value 1@ virtual_protect 0
text "OFF" 2000
end


jump @A

where is my mistake...  :eek:key:  Somebody HELP me please  :yesyes:
 

not490

Well-known member
Joined
Feb 8, 2014
Messages
438
Reaction score
4
Try this:

{$CLEO}
03A4: "not490"
0000: "ugbase.eu"
0@ = 0
0AA2: 1@ = load_library "samp.dll"
000A: 1@ += 0x13FA0 //SetPlayerPos
0A8D: 2@ = read_mem 1@ size 2 vp 0

WHILE TRUE
wait 0
if
    0ADC: "NOP"
then
    if
        0@ == 0
    then
        0AD1: "SetPlayerPos ON" 1500
        0@ = 1           
        0A8C: write_memory 1@ size 2 value 0xC390 vp 1
    else
        0AD1: "SetPlayerPos OFF" 1500
        0@ = 0
        0A8C: write_memory 1@ size 2 value 2@ vp 1
    end                 
end
end
  If u have different code in ur mod_sa, Change this
 

Edd004

Active member
Joined
Mar 10, 2013
Messages
155
Reaction score
0
not490 link said:
Try this:

{$CLEO}
03A4: "not490"
0000: "ugbase.eu"
0@ = 0
0AA2: 1@ = load_library "samp.dll"
000A: 1@ += 0x13FA0 //SetPlayerPos
0A8D: 2@ = read_mem 1@ size 2 vp 0

WHILE TRUE
wait 0
if
    0ADC: "NOP"
then
    if
        0@ == 0
    then
        0AD1: "SetPlayerPos ON" 1500
        0@ = 1           
        0A8C: write_memory 1@ size 2 value 0xC390 vp 1
    else
        0AD1: "SetPlayerPos OFF" 1500
        0@ = 0
        0A8C: write_memory 1@ size 2 value 2@ vp 1
    end                 
end
end
  If u have different code in ur mod_sa, Change this

thx bro  :urtheman:
 

Edd004

Active member
Joined
Mar 10, 2013
Messages
155
Reaction score
0
owh  :stoned:

i used > patch[] = "Prevent SetPlayerPos" &0 0 "" 0x005E4110 "568BF1" "C21000"
:dont_care:
not > sampPatch[] = "NOP SetPlayerPos" &0 0 0x13FA0  "" "C390"
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
Edd004 link said:
owh  :stoned:

i used > patch[] = "Prevent SetPlayerPos" &0 0 "" 0x005E4110 "568BF1" "C21000"
:dont_care:
not > sampPatch[] = "NOP SetPlayerPos" &0 0 0x13FA0  "" "C390"
also
C3 90 = size 2
C2 10 00 = size 3
 
Status
Not open for further replies.
Top