Memory adress of aiming at players

MichaelKl

Member
Joined
May 4, 2014
Messages
6
Reaction score
0
Hello,

does anyone have the memory adress, that gives you player information (id / name) about the ped you are aiming at?

like in this video: https://www.youtube.com/watch?v=S0d2mz1QJX4

its not cleo, its made with autohotkey.

I would be very happy if anyone is willing to share!

mfg,
 

blackHat

Expert
Joined
Jul 28, 2013
Messages
930
Reaction score
2
MichaelKl link said:
Hello,

does anyone have the memory adress, that gives you player information (id / name) about the ped you are aiming at?

like in this video: https://www.youtube.com/watch?v=S0d2mz1QJX4

its not cleo, its made with autohotkey.

I would be very happy if anyone is willing to share!

mfg,

this can be done with cleo ,, but what you want ? ,, .exe or cleo , i didn't understand you
 

MichaelKl

Member
Joined
May 4, 2014
Messages
6
Reaction score
0
Thanks for reading blackhat.

it should be done throug Autohotkey memory reading. I want to use it to give players wanted by aiming at them and pressing a button. keybinder. the only thing i want is to read out the playername and then give it to the script, for example:

i am aiming at a player, pressing 1 for give wanteds, it automatically writes /wanted playername 10 reason.

I only need the memory adress to read out the info.

I can use these functions:

ReadMemoryFirst(MADDRESS,PROGRAM)
{
        winget, pid, PID, %PROGRAM%

        VarSetCapacity(MVALUE,4,0)
        ProcessHandle := DllCall("OpenProcess", "Int", 24, "Char", 0, "UInt", pid, "UInt")
        DllCall("ReadProcessMemory","UInt",ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)

        Loop 4
        result += *(&MVALUE + A_Index-1) << 8*(A_Index-1)

        return, result
}

ReadMemoryFirstFloat(MADDRESS=0,PROGRAM="")
{
  Static OLDPROC, ProcessHandle
  VarSetCapacity(MVALUE,4,0)
  If PROGRAM != %OLDPROC%
  {
        WinGet, pid, pid, % OLDPROC := PROGRAM
        ProcessHandle := ( ProcessHandle ? 0*(closed:=DllCall("CloseHandle"
        ,"UInt",ProcessHandle)) : 0 )+(pid ? DllCall("OpenProcess"
        ,"Int",2035711,"Int",0,"UInt",pid) : 0)
  }
  If (ProcessHandle) && DllCall("ReadProcessMemory","UInt"
  ,ProcessHandle,"UInt",MADDRESS,"Str",MVALUE,"UInt",4,"UInt *",0)
  {
        MVALUE := *(&MVALUE+3)<<24 | *(&MVALUE+2)<<16 | *(&MVALUE+1)<<8 | *(&MVALUE)
        return (1-2*(MVALUE>>31)) * (2**((MVALUE>>23 & 255)-127)) * (1+(MVALUE & 8388607)/8388608)
  }
  return !ProcessHandle ? "Handle Closed: " closed : "Fail"
}

ReadMemorySecond(hwnd,address,datatype="int",length=4,offset=0)
{
VarSetCapacity(readvalue,length, 0)
DllCall("ReadProcessMemory","Uint",hwnd,"Uint",address+offset,"Str",readvalue,"Uint",length,"Uint *",0)
finalvalue := NumGet(readvalue,0,datatype)
return finalvalue
}

OpenMemoryfromTitle(title,right=0x1F0FFF)
{
WinGet,PID,PID,%title%
HWND := DllCall("OpenProcess","Uint",right,"int",0,"int",PID)
return HWND
}

CloseMemory(hwnd)
{
return DllCall("CloseHandle", "int", hwnd)
}
 

TheZeRots

Expert
Joined
Dec 21, 2013
Messages
1,247
Reaction score
1
You can do this in a CLEO.

[member=60]Opcode.eXe[/member] will gladly do it for you! :p

Check CLEO Snippets section.
 

MichaelKl

Member
Joined
May 4, 2014
Messages
6
Reaction score
0
The server i'm playing on restricts cleoscripts with own anticheat-system. thats why i need the memory adress to do it with the method described above your post.

I tried to use the adresses mentioned in the "Get Aim Target Actor" posts etc. but i just get numbers like

1920
797874541

when im reading it out. I am using autohotkey.
 
Top