Hey there,
I have 3 address which i found in Cheat Engine.
If I change in Cheat Engine the value it works.
If I change the value in my programm, which I made in Visual Studio, one address works the other two crash the game.
Can anyone help me?
Thanks
Here is my code
Code:private void Fullbright_Click(object sender, EventArgs e) { if (Fullbright.Checked) { VAMemory vam = new VAMemory("iw4mp"); vam.WriteInt32((IntPtr)0x06E661A4, 4); } else{ VAMemory vam = new VAMemory("iw4mp"); vam.WriteInt32((IntPtr)0x06E661A4, 9); } } private void UnlimitedSprint_CheckedChanged(object sender, EventArgs e) { } private void UnlimitedSprint_Click(object sender, EventArgs e) { if (UnlimitedSprint.Checked) { VAMemory vam = new VAMemory("iw4mp"); vam.WriteInt32((IntPtr)0x0086CAF8, 1); } else { VAMemory vam = new VAMemory("iw4mp"); vam.WriteInt32((IntPtr)0x0086CAF8, 4); } } private void norecoil_Click(object sender, EventArgs e) { if (norecoil.Checked) { VAMemory vam = new VAMemory("iw4mp"); vam.WriteInt32((IntPtr)0x004B9F7B, 115); } else { VAMemory vam = new VAMemory("iw4mp"); vam.WriteInt32((IntPtr)0x004B9F7B, 116); } }
For the last one you should only write 1 byte, instead of 4. By using WriteInt32 you actually write 115/116 0 0 0 to the process, which of course makes the game crash upon execution. Try using something like WriteByte instead, not sure if you have that in your VAMemory class but that's easy to add. I am not sure about the other two, I assume the first one works right? It's worth a try to just write 1 byte.
Also your code is really redundant, consider refactoring it.
- Xen0
Last edited by gerherhtherherdhher; 04-02-2017 at 12:06 PM.
Yep the first one works. Do you have skype? I want to ask you something private.
I have WriteInt32 in my VaMemory correct