System.IndexOutOfRangeException: "The index was out of range of the array." c# ReadWriteMemory

private void WeaponPistol_Click(object sender, EventArgs e) { uint vIn = 0xA2719263; long vOut = Convert.ToInt64(vIn); //This line is why im getting the error message Process process = Process.GetProcessesByName("00004D48-FiveM_GTAProcess.exe")[0]; IntPtr processHandle = OpenProcess(PROCESS_ALL_ACCESS, false, process.Id); int bytesWritten = 0; byte[] buffer = Encoding.Unicode.GetBytes("WEAPON_PISTOL\0"); WriteProcessMemory((int) processHandle, (int)vOut , buffer, buffer.Length, ref bytesWritten); } }
3 Replies
AnmeldungsFehler
AnmeldungsFehler15mo ago
guyz can anyone help me sadge
Jimmacle
Jimmacle15mo ago
looks too close to some kind of cheat
AnmeldungsFehler
AnmeldungsFehler15mo ago
but i dont want to make a cheat but im getting this error message and i dont know why Then I have to find out for myself what the problem is