Ah no, i'll explain it (with VB.Net) how i did it.
(You've to port it in C# if needed)
Here is my VB.Net Code:
- Label1 is the PlayerID
- Label2 is my CURRENT Player
- Label3 is the LAST (if you missed the focus) Player
- Label7 gets the Health of the LAST Player (and updates untill new Player is in your crosshair)
- If Label2 contains a PlayerName, it changes the PlayerName of Player #1 with the name from the player you are aiming on
Code:
ublic Class Form1
Dim PID As String
Dim updateaddy As Integer = &H1600
Dim TimerID As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Timer1.Start()
End Sub
Public Function ByteArrayToTextString(ByRef Barr() As Byte) As String
Dim enc As System.Text.Encoding = System.Text.Encoding.Default
Return enc.GetString(Barr)
End Function
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Try
Label1.Text = ReadMemory(Of Integer)(&HA4C918)
Select Case Label1.Text
Case 1
getplayerdata(1)
Case 2
getplayerdata(2)
Case 3
getplayerdata(3)
Case 4
getplayerdata(4)
Case 5
getplayerdata(5)
Case 6
getplayerdata(6)
Case 7
getplayerdata(7)
Case 8
getplayerdata(8)
Case 9
getplayerdata(9)
Case 10
getplayerdata(10)
Case 11
getplayerdata(11)
Case 12
getplayerdata(12)
Case 13
getplayerdata(13)
Case 14
getplayerdata(14)
Case 15
getplayerdata(15)
Case 16
getplayerdata(16)
Case 17
getplayerdata(17)
Case 18
getplayerdata(18)
Case Else
Label2.Text = "None"
End Select
Catch ex As Exception
End Try
End Sub
Private Sub Label2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label2.Click
End Sub
Private Sub Label2_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label2.TextChanged
If Not Label2.Tex*****ntains("None") Then
If CheckBox1.Checked = True Then
WriteMemory2(&H1D043D0 + &H1600, Label3.Text, False)
End If
End If
End Sub
Private Sub getplayerdata(ByVal pid As Integer)
Try
Dim dif As Integer = &H274 * pid
Dim dif2 As Integer = &H38EC * pid
TimerID = dif
Label2.Text = ByteArrayToTextString(ReadMemory(&H1D043D0 + dif2 + updateaddy, 116))
Timer2.Start()
Catch ex As Exception
End Try
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
Try
Label7.Text = ReadMemory(Of Integer)(&H1B3C144 + TimerID)
Catch ex As Exception
End Try
End Sub
Private Sub forcehost_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles forcehost.Tick
Try
WriteMemory(&H5AB20BC + updateaddy, 0)
WriteMemory(&H5AB2070 + updateaddy, 0)
WriteMemory(&H5AB2080 + updateaddy, 0)
WriteMemory(&H5AB36BC, 0)
WriteMemory(&H5AB36CC, 0)
WriteMemory(&H5AB3708, 0)
WriteMemory(&H5AB3718, 0)
Catch ex As Exception
End Try
End Sub
End Class
Hope you can learn from it
If there are still any questions, ask me
Btw: Used master131's memory module with some "modifications" by me.
~ hoschi111