Results 1 to 5 of 5
  1. #1
    waffl95's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    30
    Reputation
    10
    Thanks
    2

    Glitch which I can't find

    Hello,I'm working on my first hack
    My problem is when I want to freez the second weapon ammo to 20 bullets it freez the main weapon to


    Here both addresses for the main and second weapon
    Code:
    //AMMO MAIN
    unsigned ammoX =  0x01D09554 - 0x01D05C68;
    unsigned ammo1 = 0x01D05C68;
    unsigned ammo2 = ammo1+ammoX;
    unsigned ammo3 = ammo2+ammoX;
    unsigned ammo4 = ammo3+ammoX;
    unsigned ammo5 = ammo4+ammoX;
    unsigned ammo6 = ammo5+ammoX;
    unsigned ammo7 = ammo6+ammoX;
    unsigned ammo8 = ammo7+ammoX;
    unsigned ammo9 = ammo8+ammoX;
    unsigned ammo10 = ammo9+ammoX;
    unsigned ammo11 = ammo10+ammoX;
    unsigned ammo12 = ammo11+ammoX;
    unsigned ammo13 = ammo12+ammoX;
    unsigned ammo14 = ammo13+ammoX;
    unsigned ammo15 = ammo14+ammoX;
    unsigned ammo16 = ammo15+ammoX;
    unsigned ammo17 = ammo16+ammoX;
    unsigned ammo18 = ammo17+ammoX;
    
    
    unsigned ammoMainAll[] = {ammo1,ammo2,ammo3,ammo4,ammo5,ammo6 , 
    	                             ammo7,ammo8,ammo9,ammo10,ammo11,ammo12,ammo13,
                                     ammo14 , ammo15 , ammo16, ammo17,ammo18};
    
    //AMMO SEC
    unsigned secx =0x01D0953C-0x01D05C50;
    unsigned secammo1 = 0x01D05C50; 
    unsigned secammo2 = secammo1+secx;
    unsigned secammo3 = secammo2+secx;
    unsigned secammo4 = secammo3+secx;
    unsigned secammo5 = secammo4+secx;
    unsigned secammo6 = secammo5+secx;
    unsigned secammo7 = secammo6+secx;
    unsigned secammo8 = secammo7+secx;
    unsigned secammo9 = secammo8+secx;
    unsigned secammo10 = secammo9+secx;
    unsigned secammo11 = secammo10+secx;
    unsigned secammo12 = secammo11+secx;
    unsigned secammo13 = secammo12+secx;
    unsigned secammo14 = secammo13+secx;
    unsigned secammo15 = secammo14+secx;
    unsigned secammo16 = secammo15+secx;
    unsigned secammo17 = secammo16+secx;
    unsigned secammo18 = secammo17+secx;
    
    unsigned ammoSecAll[] = {secammo1,secammo2,secammo3,secammo4,secammo5,secammo6 , 
    	                            secammo7,secammo8,secammo9,secammo10,secammo11,secammo12,secammo13,
                                     secammo14 , secammo15 , secammo16, secammo17 , secammo18};
    My main:
    Code:
    	         if(unMAmmo)
    			{
    				writeMainAmmo(processHandler);
    			}
    			if(unSAmmo)
    			{
    				writeSecAmmo(processHandler);
    			}
    			
    			cout << "-----------------------------------------------" << endl;
    			cout << "              MW 3 Hack - Enabled        " << endl;
    			cout << "-----------------------------------------------" << endl << endl;
    			cout << "Hold [F1] Unlimited ammo first Weapon" << unHStatus << unHAmmo  << endl;
    			cout << "Hold [F2] Unlimited ammo second Weapon" << unSStatus<< unSAmmo << endl;
    			cout << "Hold [INSERT] Quit " << endl;
    		}
    and writeMain/SecAmmo:
    Code:
    	void writeMainAmmo(HANDLE processHandler)
    	{
    		    for(int x = 0;x < sizeof(ammoMainAll); x++)
    			{
    				WriteProcessMemory(processHandler,(LPVOID) ammoMainAll[x],&Mammo,sizeof(int),NULL);
    			}
    	}
    
    	
    	void writeSecAmmo(HANDLE processHandler)
    	{
    		    for(int x = 0;x < sizeof(ammoSecAll); x++)
    			{   
    				cout << ammoSecAll[x];
    				WriteProcessMemory(processHandler,(LPVOID) ammoSecAll[x],&Sammo,sizeof(int),NULL);
    			}
    	}
    I can't find my mistake q.q would be awsome when some one could help me!

  2. #2
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,473
    Reputation
    564
    Thanks
    5,882
    My Mood
    Psychedelic
    Why do all that manually? A loop and an array would simplify thingsAlso it's unsigned int)

    Code:
    int UpdateValPrimary =  0x01D09554 - 0x01D05C68
    int PrimaryArray[18];
    
    PrimaryArray[0] = 0x01D05C68;
    
    for(int s=1; s<18; s++)
         PrimaryArray[i] = PrimaryArray[i-1]+UpdateValPrimary;
    
    int UpdateValSecondary = 0x01D0953C-0x01D05C50;
    int SecondaryArray[18];
    
    SecondaryArray[0] = 0x01D05C50;
    
    for(int s=1; s<18; s++)
         SecondaryArray[i] = SecondaryArray[i-1]+UpdateValSecondary;
    And the sizeof the ammo is always 4 as far as im aware of.

  3. The Following User Says Thank You to Kenshin13 For This Useful Post:

    waffl95 (11-25-2012)

  4. #3
    waffl95's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    30
    Reputation
    10
    Thanks
    2
    Yeah thank your for your help !

    it was the unsigned
    Seems too work fine now


    EDIT:
    No it doesn't work ... only for I think 2 peoples (and I'm host)

    All my code currently:

    Code:
    #include <iostream>
    #include <Windows.h>
    #include <string>
    
    using namespace std;
    
    void writeAmmo(HANDLE process,int addresse[],int value);
    void iniMainAmmo();
    
    
    string gameName = "MW3";
    
    // HAUPT WAFFE AMMO UND VALUE
    int p1MainAmmo = 0x01D05C68;
    int p2MainAmmo = 0x01D0953C;
    int MainAmmo = 100;
    
    int MainAmmoAll[17];
    
    //NEBEN WAFFEN AMMO UND VALUE
    int p1SecAmmo1 = 0x01D05C54;
    int p2SecAmmo1 = 0x01D09554;
    
    int p1SecAmmo2 = 0x01D05C50;
    int p2SecAmmo2 = 0x01D09558;
    
    int SecAmmo = 10;
    
    int SecAmmoAll1[17];
    int SecAmmoAll2[17];
    
    
    int main()
    {
    	HWND window = NULL;
    	DWORD id = NULL;
    	HANDLE process = NULL;
    	iniMainAmmo();
    	while(!GetAsyncKeyState(VK_INSERT))
    	{
    		system("cls");
    		window = FindWindow(NULL,L"Call of Duty®: Modern Warfare® 3 Multiplayer");
    		if(!window)
    		{
    			cout << "MW3 nicht gefunden";
    		}
    		else
    		{
    			cout << "MW3 Gefunden";
    			GetWindowThreadProcessId(window,&id);
    			process = OpenProcess(PROCESS_VM_WRITE | PROCESS_VM_OPERATION,false,id);
    
    			writeAmmo(process,MainAmmoAll,MainAmmo);
    			writeAmmo(process,SecAmmoAll1,MainAmmo);
    			writeAmmo(process,SecAmmoAll2,MainAmmo);
    		}
    		Sleep(1000);
    	}
    
    }
    
    void iniMainAmmo()
    {
    	//PRIMARY WEAPON
    	int PrimaryOffset = p2MainAmmo - p1MainAmmo;
    	MainAmmoAll[0] = p1MainAmmo;
    
    	for(int x = 1; x < 18;x++)
    	{
    		MainAmmoAll[x] = MainAmmoAll[x-1] + PrimaryOffset;
    	}
    
    
    	//SECONDARY WEAPON
    	int SecOffset1 = p2SecAmmo1 - p1SecAmmo1;
    	SecAmmoAll1[0] = p1SecAmmo1;
    
    	for(int x = 1; x < 18;x++)
    	{
    		SecAmmoAll1[x] = SecAmmoAll1[x-1] + SecOffset1;
    	}
    
    	int SecOffset2 = p2SecAmmo2 - p1SecAmmo2;
    	SecAmmoAll2[0] = p1SecAmmo2;
    
    	for(int x = 1; x < 18;x++)
    	{
    		SecAmmoAll2[x] = SecAmmoAll2[x-1] + SecOffset2;
    	}
    
    
    }
    
    void writeAmmo(HANDLE process,int address[],int value)
    {
    	for(int x = 0; x < 18;x++)
    	{
    			WriteProcessMemory(process,(LPVOID) address[x],&value,sizeof(int),NULL);
    	}
    }
    I get the Address from p1 and p2 in a private game , different teams did i done this correct?

    Sorry I'm nearly new to C++ only worked with java a lot :/
    I hope someone can help me
    Last edited by waffl95; 11-25-2012 at 06:00 PM.

  5. #4
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,473
    Reputation
    564
    Thanks
    5,882
    My Mood
    Psychedelic
    Just try this:
    Code:
    HWND iw5mp = FindWindow(NULL,L"IW5");
    Maybe it might work as the other doesn't always find the window.
    And if it only works for two people, then the update value needs to be adjusted.

  6. #5
    waffl95's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    30
    Reputation
    10
    Thanks
    2
    It always find the window and how did you mean it with the update value?
    The time between update or the amount of ammo?

    May I get the wrong addresses ? :/

    EDIT: Okay I get the wrong offset although I read that I get all player with this way , when i use 0x38EC it works fine
    Last edited by waffl95; 11-27-2012 at 07:18 AM.

Similar Threads

  1. [Question]How can i find addresses?
    By iNsaNe.eXe in forum WolfTeam Hacks
    Replies: 8
    Last Post: 11-06-2007, 11:00 AM
  2. where can i find Cheat Engine tutorail
    By sukh13 in forum WarRock - International Hacks
    Replies: 3
    Last Post: 10-29-2007, 06:01 PM
  3. where can i find macromedia flash mx 2004 crack/serial?
    By thechewu in forum Hardware & Software Support
    Replies: 7
    Last Post: 08-27-2007, 07:06 PM
  4. Hmm,, I can't find something maybe some one can help me ^^?
    By Jeffrey1993 in forum WarRock - International Hacks
    Replies: 13
    Last Post: 08-18-2007, 08:54 PM
  5. where can i find bypasse
    By marc123 in forum WarRock - International Hacks
    Replies: 5
    Last Post: 07-03-2007, 03:18 PM