Results 1 to 8 of 8
  1. #1
    BobDaBuilderFoo's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    24
    Reputation
    10
    Thanks
    1

    Need help fixing my code

    I have a problem though. Maybe I forgot something thats probably it. Here is my current Code Could you tell me whats wrong with it because I make solution inject and try to load CA but it fails.

    Plz Help And thanks
    @flameswor10
    @Alessandro10

    Code:
    //includes all nessecary files to this source
    #include <windows.h>
    //End of includes
    //This is what you call globals.
    int HackOn = 0;
    //Define HackOn as a number, and that numebr is zero.
    int HackMax = 2;
    //Define HackMax as a number, and that number is ten.
    bool test = false;
    //Define test as a true/false. "Boolean"
    #define ADDR_SBULLLETS			0x37413976
    #define ADDR_RAPIDFIRE          0x37419A0E
    //The definition of ADDR_SBULLETS
    //End of Globals
    void WINAPIV PTC( const char* cmd )
    {
    	_asm
    	{
    	PUSH cmd ;This will push the command onto the stack, and thus becomes the parameter for the function called in the third instruction, due to its cdecl calling convention
    	MOV EAX, 0x00485FA0 ; Stores the address of the RCC function into the 32-bit Extended Accumulator Register
    	CALL EAX ; Calls the RCC function with the parameter of cmd (because it was PUSHed onto the stack above)
    	ADD ESP, 0x4 ; Clears 4 bytes from the stack, (1 param at 4 bytes on stack) which was not cleared automatically due to the cdecl calling convention
    	}
    }
    void Main (void)
    {
    	while(1)
    		//Makes an infinite loop. One that doesn't end.
    	{
    		if(GetAsyncKeyState(VK_NUMPAD1)&1)
    			//When Numpad1 Gets Pressed
    		{
    			HackOn ++;
    			//Adds +1 to the variable, "HackOn"
    			if(HackOn == HackMax) HackOn = 0;
    			//When Hackon Reaches the number HackMax, it resets HackOn to 0
    		}
    		if(test)
    			//if test is true
    		{
    			memcpy( (PBYTE)ADDR_RAPIDFIRE, (PBYTE)"\x33\xC0\x90", 3 );
    		}else{
    			//if test is not true
    			memcpy(  (PBYTE)ADDR_RAPIDFIRE, (PBYTE)"\x80\xBE\xE0\x00\x00\x00", 6 );
    			test = (!test);
    			//if test = false, turn to true and vice versa
    		}
    		if(GetAsyncKeyState(VK_NUMPAD2)&1)
    			//When Numpad2 Gets Pressed.
    		{
    			HackOn ++;
    			//Adds +1 to the variable, "HackOn"
    			if(HackOn == HackMax) HackOn = 0;
    			//When Hackon Reaches the number HackMax, it resets HackOn to 0
    		}
    		if(test)
    			//if test is true
    		{
    			memcpy( (PBYTE)ADDR_SBULLLETS, (PBYTE)"\x33\xC0\x90", 3 );
    			//look in globals for the definition of ADDR_SBULLETS
    			//Basically, it edits the bytes of the memory to "\x33\xC0\x90".
    			//The number at the end, tells you how many bytes you are editing.
    			//The first part, ADDR_SBULLETS Shows the code which part of the memory we are editing.
    		}else{
    			//if test is not true
    			memcpy(  (PBYTE)ADDR_SBULLLETS, (PBYTE)"\x0F\x94\xC0", 3 );
    			//look in globals for the definition of ADDR_SBULLETS
    			//Basically, it edits the bytes of the memory to "\x0F\x94\xC0".
    			//The number at the end, tells you how many bytes you are editing.
    			//The first part, ADDR_SBULLETS Shows the code which part of the memory we are editing.
    		}
    		if(GetAsyncKeyState(VK_NUMPAD3)&1)
    		{
    				HackOn ++;
    				if(HackOn == HackMax) HackOn = 0;
    		}
    		if(test)
    		{
    			PTC( "SkelModelStencil 1" );
    		}else{
    			PTC("SkelModelStencil 0" );
    		}
    		if(GetAsyncKeyState(VK_NUMPAD4)&1)
    		{
    				HackOn ++;
    				if(HackOn == HackMax) HackOn = 0;
    		}
    		if(test)
    		{
    			PTC( "FogEnable 0" );
    		}else{
    			PTC("FogEnable 1" );
    		}
    		if(GetAsyncKeyState(VK_NUMPAD5)&1)
    		{
    				HackOn ++;
    				if(HackOn == HackMax) HackOn = 0;
    		}
    		if(test)
    		{
    			PTC( "ModelDebug_DrawSkeleton 1" );
    		}else{
    			PTC("ModelDebug_DrawSkeleton 0" );
    		}
    		if(GetAsyncKeyState(VK_NUMPAD6)&1)
    		{
    				HackOn ++;
    				if(HackOn == HackMax) HackOn = 0;
    		}
    		if(test)
    		{
    			PTC( "PlayerGravity -800" );
    		}else{
    			PTC("PlayerGravity 0" ); //Need to find default 
    		}
    		if(GetAsyncKeyState(VK_NUMPAD7)&1)
    		{
    				HackOn ++;
    				if(HackOn == HackMax) HackOn = 0;
    		}
    		if(test)
    		{
    			PTC( "WeaponSway 0.000000" );
    		}else{
    			PTC("WeaponSway 50.000000" ); //Need to find default 
    		}
    		if(GetAsyncKeyState(VK_NUMPAD8)&1)
    		{
    				HackOn ++;
    				if(HackOn == HackMax) HackOn = 0;
    		}
    		if(test)
    		{
    			PTC( "ShowFps 1" );
    		}else{
    			PTC("ShowFps 0" );
    		}
    	}
    }
    DWORD WINAPI Lesson (LPVOID)
    // This is just a dummy function that will be the code activate the main thread
    {	
    	Main();
    	//Call the thread called Main
    	return 1;
    	//Finish of the thread.
    }
    
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    // DllMain is an optional function for you to declare.
    // It serves as the entry point for any DLL
    {
    	DisableThreadLibraryCalls(hDll);
    	// Make a call to DisableThreadLibraryCalls with the hModule variable
    	// as its argument; Doing this is an optimization trick to prevent
    	// needless thread attach/detach messages from triggering further calls
    	// to our DllMain function.
    	if ( dwReason == DLL_PROCESS_ATTACH )
    	{
    		//When this dll is injected into the process. this is what the dll is supposed to do.
    		// Null, in C Plus Plus, nothing. It is defined as 0
    		CreateThread(NULL, NULL, Lesson, NULL, NULL, NULL);
    		//It creates the thread called "Lesson" which is defined a few lines up. DWORD WINAPI Lesson (LPVOID)
    	}
    return TRUE;
    // Although the return value doesn't actually matter. You return the value TRUE or FALSE indicatinng success or failure.
    
    }
    Last edited by BobDaBuilderFoo; 11-23-2011 at 11:52 PM.

  2. #2
    teehee15's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Posts
    334
    Reputation
    52
    Thanks
    109
    lol well for just one ur PTC is detected.

  3. #3
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,404
    My Mood
    In Love
    You should learn C++ before begining.
    You have no idea what the code is doing lool.

    You have 3 hacks on the same boolean, and you need to hook a DirectX function and call PTC from within or you crash
    No I do not make game hacks anymore, please stop asking.


    Been MPGH Minion: 6 July 2011 - 1 August 2012

  4. The Following User Says Thank You to flameswor10 For This Useful Post:

    mountainjew (11-29-2011)

  5. #4
    Skaterforeva1's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Up your ass
    Posts
    917
    Reputation
    32
    Thanks
    476
    My Mood
    Psychedelic
    you also just copied and pasted flames base lol

    ^Suck it!


  6. #5
    OBrozz's Avatar
    Join Date
    May 2011
    Gender
    male
    Posts
    820
    Reputation
    65
    Thanks
    813
    Dont copy and paste
    Last edited by OBrozz; 11-27-2011 at 04:44 PM.

  7. #6
    KawaiiSlut's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    419
    Reputation
    16
    Thanks
    86
    lol maybe your problem is in the way you declared your function...

    void WINAPIV PTC
    ^

  8. #7
    Saltine's Avatar
    Join Date
    Jun 2011
    Gender
    male
    Posts
    494
    Reputation
    104
    Thanks
    625
    Quote Originally Posted by KawaiiSlut View Post
    lol maybe your problem is in the way you declared your function...

    void WINAPIV PTC
    ^
    #define WINAPIV __cdecl
    and
    __cdecl = default
    so
    why even bother lol?

  9. The Following User Says Thank You to Saltine For This Useful Post:

    KawaiiSlut (11-27-2011)

  10. #8
    Deuce.'s Avatar
    Join Date
    Nov 2011
    Gender
    male
    Posts
    15
    Reputation
    10
    Thanks
    0

    Not 1% Yours (:

Similar Threads

  1. [Help Request] need help with injecting code/using it
    By 0xx-kyle-xx0 in forum Combat Arms Help
    Replies: 0
    Last Post: 07-06-2011, 04:24 PM
  2. [HELP] I NEED HELP WITH STAMINA CODE
    By ilovepie21 in forum Visual Basic Programming
    Replies: 15
    Last Post: 03-03-2008, 08:41 PM
  3. need help with teleport code
    By konni in forum WarRock - International Hacks
    Replies: 0
    Last Post: 07-30-2007, 12:07 AM
  4. need help plz vb6 codeing fast registration
    By cjg333 in forum WarRock - International Hacks
    Replies: 3
    Last Post: 07-05-2007, 07:38 AM
  5. NEED help with verification code when registering!
    By vinogradov in forum WarRock Korea Hacks
    Replies: 2
    Last Post: 05-30-2007, 08:20 PM