This is my updates code, i looked in the disassembler and it showed 4 bytes, so i assume i need 4 0x90's? The address i am using seems to be right, as last night when i did write this address in CE, same address showed up in red. Also i found most of this code on the internet on other forums.
Code:
#include <iostream>
#include <windows.h>
using namespace std;
DWORD proc_id;
HANDLE hProcess;
int main()
{
HWND hWnd = FindWindow(0, "Modern Warfare 2");
GetWindowThreadProcessId(hWnd, &proc_id);
hProcess = OpenProcess(PROCESS_ALL_ACCESS|PROCESS_VM_OPERATION|PROCESS_VM_READ|PROCESS_VM_WRITE|PROCESS_QUERY_INFORMATION, FALSE, proc_id);
main();
BYTE Nop[ ] = {(0x90, 0x90, 0x90, 0x90)};
WriteProcessMemory(hProcess, (LPVOID*)(DWORD) (0x004C6E0D), &Nop, sizeof(Nop), NULL);
WriteProcessMemory(hProcess, (LPVOID*)(DWORD) (0x004C6E0D), &Nop, sizeof(Nop), NULL);
WriteProcessMemory(hProcess, (LPVOID*)(DWORD) (0x004C6E0D), &Nop, sizeof(Nop), NULL);
WriteProcessMemory(hProcess, (LPVOID*)(DWORD) (0x004C6E0D), &Nop, sizeof(Nop), NULL);
}