Red face[VB.Net] Simple Command "Class" (For Kenshin13 Jr)

Posts 13 of 3 · Page 1 of 1
[VB.Net] Simple Command "Class" (For Kenshin13 Jr)
.
@ImMalkah

As I said, I would create a simple Command "Class" for you, and here it is


 
View Code
Code:
Dim PlayerAddresses As Integer() = {100, 200, 300, 400} 'Player 1 | Player 2 | Player 3 | Player 4
    Dim FunctionOffsets As Integer() = {&H1, &H2, &H3, &H4, &H5} 'Primary Ammo | Secondary Ammo | Grenades Ammo | Health | Score (Offset value from Player Address)

Public Function AnalyzeCommand(ByVal Command As String) As Integer()
        Dim PlayerIndex, OptionIndex As Integer

        If Command.Contains("p1") Then PlayerIndex = 0
        If Command.Contains("p2") Then PlayerIndex = 1
        If Command.Contains("p3") Then PlayerIndex = 2
        If Command.Contains("p4") Then PlayerIndex = 3

        If Command.Contains("pAmmo") Then OptionIndex = 0
        If Command.Contains("sAmmo") Then OptionIndex = 1
        If Command.Contains("gAmmo") Then OptionIndex = 2
        If Command.Contains("health") Then OptionIndex = 3
        If Command.Contains("score") Then OptionIndex = 4

        Return {PlayerAddresses(PlayerIndex) + FunctionOffsets(OptionIndex), Int32.Parse(Command.Remove(0, Command.LastIndexOf(" ")))}
    End Function


How To Use

The 'PlayerAddress' is where you enter the address for each player. (It must be the same 'base' for all.)
-Example: Use the player's name, as the base address. And take the Name Address (-) Health Address. (Then you get the Offset)

Add the Offset you got for Health in the: 'FunctionOffset', in the Correct Index Position.
Re-do this for all the options you want


Usage:
Thanks bro, ill try to do this
can someone send me a test for send command to the game?
like give weapon "weapon name"
Posts 13 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?