HelpMw3.SetInt with textBox

Posts 1–5 of 5 · Page 1 of 1
Mw3.SetInt with textBox
Hey
I want to set the Value of (for example Jump Hight Address)
to any value so i write:

Mw3.Hack("iw5sp")
Mw3.SetInt(&H1C5E0F4, TextBox1.Text)
Mw3.Hack("iw5sp")
Mw3.SetInt(&H185E0A8, TextBox1.Text)

With a 4Byte it works but with a Float dont!
What can i do??
Quote Originally Posted by lappendance View Post
Hey
I want to set the Value of (for example Jump Hight Address)
to any value so i write:

Mw3.Hack("iw5sp")
Mw3.SetInt(&H1C5E0F4, TextBox1.Text)
Mw3.Hack("iw5sp")
Mw3.SetInt(&H185E0A8, TextBox1.Text)

With a 4Byte it works but with a Float dont!
What can i do??

Hey @lappendance !
Didn't I tell you to use new class ?
SetInt = SetInteger => Integer = 4bytes => can't be used with Float
C# ain't my strong point but:

Code:
try {
   int floatAsInt = BitConverter.ToInt32(BitConverter.GetBytes(Float.TryParse(TextBox1.Text)));
   Mw3.Hack("iw5sp");
   Mw3.SetInt(&H1C5E0F4, floatAsInt);
}
catch (Exception exc)
{
  MessageBox.Show(exc.ToString());
}
Sorry, didn't sleep in 30 hours
Quote Originally Posted by Kenshin13 View Post
C# ain't my strong point but:

Sorry, didn't sleep in 30 hours
Hehe @Kenshin13 "":

New WriteFunction:
Code:
Private Sub Write(Address As Integer, Value As Float)
        Dim Buffer As Byte() = BitConverter.GetBytes(Value)
        Dim Zero As IntPtr = IntPtr.Zero
        WriteProcessMemory(pHandel, New IntPtr(Address), Buffer, UInt32.Parse(Buffer.Length), Zero)
End Sub
WriteFloat:
Code:
   Public Sub WriteFloat(Address As Integer, Value As Float)
        Write(Address, Value)
    End Sub
Plus he wants VB.NET xD
Go sleep, C# w/o semicolons ?!
@Lovroman Yea you told me but i write the complete code with the olde Code.....So it will take a while to change in the new class i will do this in the next view days....
Posts 1–5 of 5 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us