I'm trying to iterate through objects and identify the unit that I have targeted, but I can't seem to get it working. I've been staring at this for the last 12 hours literally and I'm about to pull my hair out. Can anyone help a polite scrub out with some knowledge? I'm on x64 client.
Code:
Dim p As New ProcessSharp(System.Diagnostics.Process.GetProcessById(9368))
p.Memory = New ExternalProcessMemory(p.Handle)
Dim entityBase As IntPtr = p.Native.MainModule.BaseAddress + &H1578070
Dim current As IntPtr = p.Memory.Read(Of IntPtr)(entityBase)
Dim targetGuid As Guid = p.Memory.Read(Of Guid)(p.Native.MainModule.BaseAddress + &H179C940)
If current = IntPtr.Zero Then
End
End If
current = p.Memory.Read(Of IntPtr)(current + &H18)
Dim currentGuid As Guid = p.Memory.Read(Of Guid)(current + &H8)
While Not current = IntPtr.Zero
Dim eType As Integer = p.Memory.Read(Of Integer)(current + &H20) 'Entity Type
If eType > 0 Then
If currentGuid = targetGuid Then
MsgBox("COCKS LOL")
End If
current = p.Memory.Read(Of IntPtr)(current + &H70)
currentGuid = p.Memory.Read(Of Guid)(current + &H8)
Else
Exit While
End If
End While
It seems to be iterating the units properly, I set it to list players (entity type = 4) and it had the correct amount of entries so I don't think my problem is there. I'm pulling Guid from Entity+0x8 and trying to match it to TargetGuid but I've had no luck. What am I doing wrong? :gusta::gusta::gusta: