Results 1 to 10 of 10
  1. #1
    gogogokitty's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Posts
    1,090
    Reputation
    113
    Thanks
    3,503

    how can i make my hack add a value when i press a key?

    what the title says, how can i make it so when i press F3 it adds 750 points to my current amount of points? ive tried everything i can think of, this is what i tried last. it just changes my ingame points to 750.
    Code:
    while (true)
    	{
    		{ cout << "press F3 to add 750 points\n";
    
    		{int value;
    		value = 750;
    		if (GetAsyncKeyState(VK_F3)){
    			value += 750;
    			DWORD newdatasize = sizeof(value);
    			(WriteProcessMemory(hProcess, (LPVOID)0x018EF124, &value, newdatasize, NULL));
    			cout << "Points have been added \n";
    			cout << " \n";
    		}
    		}
    		}
    		system("pause");
    		cout << " \n";
    	}
    heres something i just tried that gives me a compile error that im not sure how to fix. Error 1 error C4700: uninitialized local variable 'value' used
    Code:
    while (true)
    	{
    		{ cout << "press F3 to add 750 points\n";
    
    		{int value;
    
    		if (GetAsyncKeyState(VK_F3)){
    			DWORD newdatasize = (value) += 750;																				// line 36
    			(WriteProcessMemory(hProcess, (LPVOID)0x018EF124, &value, newdatasize, NULL));
    			cout << "Points have been added \n";
    			cout << " \n";
    		}
    		}
    		}
    		system("pause");
    		cout << " \n";
    	}
    Last edited by gogogokitty; 02-18-2014 at 03:07 PM.

  2. #2
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,417
    Reputation
    611
    Thanks
    11,989
    My Mood
    Cheerful
    Code:
    int value = 0;
    //or 
    int value;
    value = 0;
    You'll have to read amount of points using RPM and then load an amount in the variable..

  3. #3
    gogogokitty's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Posts
    1,090
    Reputation
    113
    Thanks
    3,503
    Quote Originally Posted by Lovroman View Post
    Code:
    int value = 0;
    //or 
    int value;
    value = 0;
    You'll have to read amount of points using RPM and then load an amount in the variable..
    i tried this but when i press f3 it crashes my game
    Code:
    while (true)
    	{
    		{ cout << "press F3 to add 750 points\n";
    
    		{int value = 0;
    
    		if (GetAsyncKeyState(VK_F3)){
    			DWORD newdatasize = (value) += 750;																				// line 36
    			(WriteProcessMemory(hProcess, (LPVOID)0x018EF124, &value, newdatasize, NULL));
    			cout << "Points have been added \n";
    			cout << " \n";
    		}
    		}
    		}
    		system("pause");
    		cout << " \n";

  4. #4
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,417
    Reputation
    611
    Thanks
    11,989
    My Mood
    Cheerful
    Quote Originally Posted by gogogokitty View Post
    i tried this but when i press f3 it crashes my game
    Code:
    while (true)
    	{
    		{ cout << "press F3 to add 750 points\n";
    
    		{int value = 0;
    
    		if (GetAsyncKeyState(VK_F3)){
    			DWORD newdatasize = (value) += 750;																				// line 36
    			(WriteProcessMemory(hProcess, (LPVOID)0x018EF124, &value, newdatasize, NULL));
    			cout << "Points have been added \n";
    			cout << " \n";
    		}
    		}
    		}
    		system("pause");
    		cout << " \n";
    Use VirtualProtect(altough it shouldn't crash it).

  5. #5
    gogogokitty's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Posts
    1,090
    Reputation
    113
    Thanks
    3,503
    Quote Originally Posted by
    Use VirtualProtect(altough it shouldn't crash it).[/COLOR
    [/FONT]
    sorry im not as advanced as that yet, whats VirtualProtect? and the memory is not protected
    Last edited by gogogokitty; 02-18-2014 at 03:43 PM.

  6. #6
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,417
    Reputation
    611
    Thanks
    11,989
    My Mood
    Cheerful
    Quote Originally Posted by gogogokitty View Post
    sorry im not as advanced as that yet, whats VirtualProtect? and the memory is not protected
    Ik, it's not.
    VirtualProtect prevents a game from crashing.

  7. #7
    gogogokitty's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Posts
    1,090
    Reputation
    113
    Thanks
    3,503
    Quote Originally Posted by Lovroman View Post


    Ik, it's not.
    VirtualProtect prevents a game from crashing.
    ahh i did not know that thank you ill give an attempt

  8. #8
    gogogokitty's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Posts
    1,090
    Reputation
    113
    Thanks
    3,503
    im not sure what to do with it. im not sure how to get the value of the points

  9. #9
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,417
    Reputation
    611
    Thanks
    11,989
    My Mood
    Cheerful
    Quote Originally Posted by gogogokitty View Post
    im not sure what to do with it. im not sure how to get the value of the points
    Code:
    DWORD oldProtect;
    VirtualProtect((LPVOID)0x018EF124,4,PAGE_READWRITE,&oldProtect);
    //Do whatever you want do to 
    VirtualProtect((LPVOID)0x018EF124,4,oldProtect,&oldProtect);

  10. The Following User Says Thank You to Lovroman For This Useful Post:

    gogogokitty (02-19-2014)

  11. #10
    gogogokitty's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Posts
    1,090
    Reputation
    113
    Thanks
    3,503
    solved because Lovroman is a boss

  12. The Following User Says Thank You to gogogokitty For This Useful Post:

    Lovroman (02-20-2014)

Similar Threads

  1. [Solved] How Can I Make A Hack
    By CyberCoders in forum CrossFire Help
    Replies: 2
    Last Post: 03-15-2012, 08:03 PM
  2. [Help] How can i make my hack undetected?
    By s1con1337 in forum CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    Replies: 4
    Last Post: 10-29-2011, 11:26 AM
  3. Can someone help me how can I make a hack?
    By anonimo13 in forum CrossFire Help
    Replies: 8
    Last Post: 04-08-2010, 02:35 PM
  4. How can i make a hack for WarRock?
    By tomva in forum General Game Hacking
    Replies: 4
    Last Post: 06-09-2007, 03:13 PM
  5. how can i make game hack?!!!!
    By UnknownID in forum General Game Hacking
    Replies: 2
    Last Post: 02-07-2006, 07:21 PM