Results 1 to 8 of 8
  1. #1
    LEGiiTxCHAOTiiC's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    Chicago
    Posts
    200
    Reputation
    39
    Thanks
    70

    [4D1] Get Any FoV You Want

    With my little program, you can change your field of view from 1 - 160 degrees. Just open MW2, then this program and type in the degrees of field of view you want. This is pretty much only good if you want above 90, but I made it anyway. I found the addresses with Cheat Engine. This was made 100% by me. It's simple. Don't rip off code please and enjoy this program.

    NOTE: THE GOTO WAS ONLY OUT OF LAZINESS, YOU SHOULD CHANGE IT!!!!

    Code:
    #include <iostream>
    #include <Windows.h>
    
    void pauseConsole(int sleepTime);
    
    int main(int argc, char* argv[])
    {
        SetConsoleTitleA(TEXT("Modern Warfare 2 - Field of View Changer"));
    
    	HWND hWnd = FindWindow(NULL, TEXT("Modern Warfare 2"));
    
    	if(hWnd == NULL)
    	{
    		std::cerr << "ERROR :: Cannot find window\n" << std::endl;
    	}
    
    	else
    	{
    		DWORD pId;
    
    		GetWindowThreadProcessId(hWnd, &pId);
    
    		HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pId);
    
    		if(!hProc)
    		{
    			std::cerr << "ERROR :: Cannot open process\n" << std::endl;
    		}
    
    		else
    		{
                float fov;
    
                start:
    
                    std::cout << "What degree would you like to set your field of view? (Domain = 1-160): ";
                    std::cin >> fov;
    
                    if(fov > 160 || fov < 1)
                    {
                        std::cout << "Error: Cannont set field of view below 1, nor greater than 160, please only use values within the domain" << std::endl;
                    }
    
                    if(WriteProcessMemory(hProc, (LPVOID)0x063FB5C0, &fov, sizeof(fov), NULL) && WriteProcessMemory(hProc, (LPVOID)0x063FB5D0, &fov, sizeof(fov), NULL))
                    {
                        goto start;
                    }
    
    			/* CloseHandle(hProc); */
    		}
    	}
    	pauseConsole(0);
    
    	return 0;
    }
    
    void pauseConsole(int sleepTime)
    {
        if(sleepTime == 0)
        {
            std::clog << "\nPress <Enter> to continue...";
            std::cin.clear();
            std::cin.ignore();
        }
    
    	else
    	{
    	    Sleep(sleepTime);
    	    std::clog << "\nPress <Enter> to continue...";
            std::cin.clear();
            std::cin.ignore();
    	}
    }

  2. #2
    intervention61's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    285
    Reputation
    10
    Thanks
    829
    My Mood
    Cool
    I dont think dvar addresses are static, use pointers. Also this code wouldnt work for everyone, im guessing it works for you because you are on Windows XP. To open a handle to another process and obtain full access rights ( PROCESS_ALL_ACCESS ) you need to enable debug privilage. You dont even need PROCESS_ALL_ACCESS for what you want to do; just use PROCESS_VM_OPERATION | PROCESS_VM_READ | PROCESS_VM_WRITE and no need for debug privilage either.
    "Joker: why the hakcer are steaklign us name it´s the greatest asshole and motherfucker and i fuck him or her mother"

  3. #3
    aIW|Convery's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    2,876
    Reputation
    124
    Thanks
    595
    My Mood
    Cynical
    Pretty sure that I have posted like 15 sources to FOV changers in the MW3 section..

    Also, use loops and there is two different locations for clients 0-8 and 9-17..
    Aaaaaaaaand, FOV goes to 180 which is awesome to play at..
    Last edited by aIW|Convery; 07-24-2012 at 07:29 AM.

  4. #4
    LEGiiTxCHAOTiiC's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    Chicago
    Posts
    200
    Reputation
    39
    Thanks
    70
    Does it work for you? Also, how would I use a pointer for this? I never understood pointers, and I'm not all that big on C(*) languages, so I use other langs.

    ---------- Post added at 01:21 AM ---------- Previous post was at 01:20 AM ----------

    I don't look at MW3 so sorry...

    I also changed the degree domain, idk why I thought it was 160...

    UPDATE:

    Code:
    // main.cpp
    #include "main.h"
    
    void pauseConsole(int sleepTime);
    
    int main(int argc, char* argv[])
    {
        SetConsoleTitleA(TEXT("Modern Warfare 2 - Field of View Changer"));
    	HWND hWnd = FindWindow(NULL, TEXT("Modern Warfare 2"));
    
    	if(hWnd == NULL)
    	{
    		MessageBoxA(NULL, TEXT("Couldn't find Modern Warfare 2 window! Please start Modern Warfare 2 before this program"), TEXT("Error"), 0x00000010L | 0x00000000L);
    	}
    
    	else
    	{
    		DWORD pId;
    		GetWindowThreadProcessId(hWnd, &pId);
    		HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pId);
    
    		if(!hProc)
    		{
    			MessageBoxA(NULL, TEXT("Couldn't open process"), TEXT("Error"), 0x00000010L | 0x00000000L);
    		}
    
    		else
    		{
    		    for(;;)
                {
                    std::cout << "What degree would you like to set your field of view? (Domain = 1-180): ";
                    std::cin >> fov;
    
                    if(fov > 180 || fov < 1)
                    {
                        std::cout << "Error: Cannont set field of view below 1, nor greater than 180, please only use values within the domain" << std::endl;
                    }
    
                    else
                    {
                        WriteProcessMemory(hProc, (LPVOID)0x063FB5C0, &fov, sizeof(fov), NULL);
                        WriteProcessMemory(hProc, (LPVOID)0x063FB5D0, &fov, sizeof(fov), NULL);
                    }
                }
                /* CloseHandle(hProc); */
    		}
    	}
    	return 0;
    }
    
    void pauseConsole(int sleepTime)
    {
        if(sleepTime == 0)
        {
            std::clog << "\nPress <Enter> to continue...";
            std::cin.clear();
            std::cin.ignore();
        }
    
    	else
    	{
    	    Sleep(sleepTime);
    	    std::clog << "\nPress <Enter> to continue...";
            std::cin.clear();
            std::cin.ignore();
    	}
    }
    Code:
    //main.h
    #pragma once
    
    #ifndef MAIN_H
    #define MAIN_H
    
    #include <iostream>
    #include <windows.h>
    
    float fov;
    
    #endif
    Last edited by LEGiiTxCHAOTiiC; 07-25-2012 at 09:23 AM.

  5. #5
    Bongsa's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    Egge
    Posts
    6
    Reputation
    10
    Thanks
    0
    Im to stupid to compile that, can anyone upload it?

  6. #6
    rawr im a tiger's Avatar
    Join Date
    Feb 2012
    Gender
    male
    Location
    On the edge of Sanity
    Posts
    238
    Reputation
    40
    Thanks
    1,017
    My Mood
    Angelic
    or just use cg_fovscale, even though the fov already goes to insane amounts..

    anyway, nice work I guess

  7. #7
    Instrumental's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Location
    Global
    Posts
    1,220
    Reputation
    59
    Thanks
    704
    My Mood
    Cheerful
    Quote Originally Posted by rawr im a tiger View Post
    or just use cg_fovscale, even though the fov already goes to insane amounts..

    anyway, nice work I guess
    I agree with u.

  8. The Following User Says Thank You to Instrumental For This Useful Post:

    noname65 (09-19-2012)

  9. #8
    xSnIcKeRSx's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    3
    Reputation
    10
    Thanks
    0
    how can i do fov 100 in 4d1 mw3?
    Last edited by xSnIcKeRSx; 02-23-2013 at 05:16 AM.

Similar Threads

  1. Were to get any game you want
    By Valmoric in forum Suggestions, Requests & Help
    Replies: 5
    Last Post: 08-10-2010, 09:01 PM
  2. Selling A CPT 3 For Any Price You Want !
    By DrUnKeN ChEeTaH in forum Selling Accounts/Keys/Items
    Replies: 12
    Last Post: 02-22-2010, 07:52 PM
  3. [Tutorial] How to make any name you want SF
    By Tom in forum Soldier Front General
    Replies: 5
    Last Post: 11-25-2009, 05:58 AM
  4. Get any msn you want.
    By mostwanted in forum Programming Tutorials
    Replies: 1
    Last Post: 07-24-2008, 08:58 AM

Tags for this Thread