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.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.[/quote][quote author="springfield"]What's not detailed?
Ex. of NOP without sampfuncs.
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
{$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
{$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 this0x13FA0
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
endIf u have different code in ur mod_sa, Change this0x13FA0
alsoEdd004 link said:owh :stoned:
i used > patch[] = "Prevent SetPlayerPos" &0 0 "" 0x005E4110 "568BF1" "C21000"
:dont_care:
not > sampPatch[] = "NOP SetPlayerPos" &0 0 0x13FA0 "" "C390"