This example will set the field of view in degrees to 100, in C code.
int main(int argc, char* argv)
HWND hwnd = FindWindow(0, TEXT("Modern Warfare 2"));
float fov = 100.0;
HANDLE hProc = OpenProcess(PROCESS_VM_WRITE | PROCESS_VM_OPERATION, FALSE, dwPId);
WriteProcessMemory(hProc, (LPVOID)0x063FB5C0, &fov, sizeof(fov), NULL);
WriteProcessMemory(hProc, (LPVOID)0x063FB5D0, &fov, sizeof(fov), NULL);
Creates a handle that looks for the Modern Warfare 2 window. Then it writes to 2 memory addresses with the value of the desired field of view, being 100 degrees. It's very very simple, you should add your own checks to make sure it writes the memory properly, as this makes no checks for say, window being present, if injection was successful, being able to open process etc. Also, add user input. You can find my more advanced version in this section.