Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    fearmeknowme's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    2
    My Mood
    Sneaky

    How to turn hotkey hack on/off?

    Hello everyone, so i'm just going to let all of you know i'm a complete NOOB at C++ and making hacks... i'm just here to learn and hopefully become more advanced at this later on... Yes, i did C+P some stuff but it's all for educational purposes! so here we go !

    Code:
    #include <windows.h>
    
    bool IsGameReadyForHook()
    {
    if( GetModuleHandleA( "d3d9.dll" ) != NULL
    && GetModuleHandleA( "ClientFX.fxd" ) != NULL
    && GetModuleHandleA( "CShell.dll" ) != NULL )
    return true;
    return false;
    }
    
    void __cdecl PushToConsole( const char* szCommand )
    {
    DWORD *LTClient = ( DWORD* )( 0x3778BFB0 );
    void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
    __asm
    {
    push szCommand;
    call CONoff;
    add esp, -4-2+6+4
    }
    }
    void main()
    {
    while(true)
    {
    	if(GetAsyncKeyState(VK_NUMPAD0)<0){
    		PushToConsole("SkelModelStencil -1" );
    		PushToConsole("ModelDebug_DrawBoxes 1" );
    	}
    	if(GetAsyncKeyState(VK_NUMPAD1)<0){
    		PushToConsole("FogEnable 1" );
    	}
    }
    }
    
    DWORD WINAPI dwHackThread(LPVOID)
    {
    while( !IsGameReadyForHook() )
    Sleep(100);
    main();
    return 0;
    }
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    DisableThreadLibraryCalls(hDll);
    if ( dwReason == DLL_PROCESS_ATTACH )
    {
    CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
    }
    return TRUE;
    }
    Credits go to CoderNever, acid_burn , almost everyone here on mpgh!

    As i said on the topic title, how do i make it so that i can turn the hacks on and off? i've tested this hack in game and all i can do right now is turn it on.... what i want is to be able to turn on and off! Thank you please teach me!!
    AND yes, i'm quite sure there are errors as i'm a complete noob

  2. The Following User Says Thank You to fearmeknowme For This Useful Post:

    leoisso (07-21-2010)

  3. #2
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,170
    Reputation
    490
    Thanks
    2,252
    void main()
    {
    bool chams = false;
    while(true)
    {
    if(GetAsyncKeyState(VK_NUMPAD0)<0){
    if(chams){
    PushToConsole("SkelModelStencil 0" );
    PushToConsole("ModelDebug_DrawBoxes 0" );
    chams = false;
    }else{
    PushToConsole("SkelModelStencil 1" );
    PushToConsole("ModelDebug_DrawBoxes 1" );
    chams = true
    }
    }

    }
    }

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

    leoisso (07-21-2010)

  5. #3
    CoderNever's Avatar
    Join Date
    Feb 2009
    Gender
    female
    Location
    http://mpgh.net MPGHCash: $700,458,011
    Posts
    1,196
    Reputation
    131
    Thanks
    2,233
    My Mood
    Buzzed
    Ok So what you want to do is to define a BOOL you can add the bool right above your include. A bool is a ture/false statement so you can put this under your incude.

    Code:
    bool HackStatus = false;
    this will define it, and will set it to false.

    Now you can add

    Code:
    && HackStatus == true
    after your hotkey define so it would look like..

    Code:
    if(GetAsyncKeyState(VK_NUMPAD0)<0 && HackStatus == true){
    which means it will only work if it is set to true. So now we want to make it so we can set it to true, because none of the above codes set it to true xD.

    so basically your entire main should look like this

    Code:
    void main()
    {
    while(true)
    {
    	if(GetAsyncKeyState(VK_NUMPAD0 <0 && HackStatus == true){
    		PushToConsole("SkelModelStencil 0" );
    		HackStatus = false;
    	}
           if(GetAsyncKeyState(VK_NUMPAD0 <0 && HackStatus == false){
    		HackStatus = true;
                    PushToConsole("SkelModelStencil 1" );
    	}
    
    }
    }
    I Apologize for my latest release "CN Hack 7-11-11" I assure you it is not up to "CN Standard", and I feel bad due to all its flaws. I'm working hard, and steadily to remake it for I can bring everyone a hack they will really like!


    Support NSY Inject

    CoderNever
    GameArena
    _Fk127_
    ViSiON
    -Lunar_
    Bubbles Kittys

    Code:
    óN Mike says
    Cyber Bulling is bad
    J Whit says
    Yea bob wants to fuck my pussy
    óN Mike says
    Whit
    dont be a cyber bully
    J Whit says
    FUCK YOU
    óN Mike says
    Words hurt
    ѱ NOOB says
    whit gets bullied in school so he goes online and bullies kids online
    J Whit says
    DUH
    Stress relieve
    relieving
    The kintergarden kids beat my ass
    óN Mike says
    Thats just sad

  6. The Following 4 Users Say Thank You to CoderNever For This Useful Post:

    DaBrowSky (07-21-2010),fearmeknowme (07-20-2010),leoisso (07-21-2010),whit (07-20-2010)

  7. #4
    zmansquared's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    Kickin it at Microsoft
    Posts
    2,088
    Reputation
    36
    Thanks
    221
    My Mood
    Cheerful
    my num pad hack, you dont need the }else{..just saying
    Need Help With Coding or Something??? MSN me
    zmansquared@hotmail.com


    I am the one and only Microsoft Fag!!!

    Quote:
    Originally Posted by Arhk
    All games should be hacked, if we don't do it someone else will. Hackers force the progress, of better programming methods.
    ~


    Take this Pic everyone!



    next-

  8. #5
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,170
    Reputation
    490
    Thanks
    2,252
    Damit CN's was better

  9. #6
    GameTrainerMaker's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    465
    Reputation
    17
    Thanks
    514
    Code:
    bool chams = false;
    Code:
    if(GetAsyncKeyState(VK_NUMPAD1)<0){
    			if(chams==false){
    				ConsolePush("SkelModelStencil 1");
    				chams=true;
    			}else{
    				ConsolePush("SkelModelStencil 0");
    				chams=false;
    			}
    		}
    is how i done mine

  10. #7
    fearmeknowme's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    2
    My Mood
    Sneaky
    Ok, so i added the bool and the true/false thing, my code looks like this now
    Code:
    void main()
    {
    bool HackStatus = false;
    while(true)
    {
    	if(GetAsyncKeyState(VK_NUMPAD0 <0 && HackStatus == true){
    		PushToConsole("SkelModelStencil 0" );
    		HackStatus = false;
    	}
           if(GetAsyncKeyState(VK_NUMPAD0 <0 && HackStatus == false){
    		HackStatus = true;
                    PushToConsole("SkelModelStencil 1" );
    	}
    
    }
    }
    But C++ says
    error C2143: syntax error : missing ')' before '{'
    error C2143: syntax error : missing ')' before '{'
    What am i doing wrong?
    Thanks a lot!

  11. #8
    GameTrainerMaker's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    465
    Reputation
    17
    Thanks
    514
    look at the error? it says missing ')' before '{'

    double click on the syntax error.. it will take you to the code that the error is in.. just add ')' before you have the '{'

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

    fearmeknowme (07-20-2010)

  13. #9
    CoderNever's Avatar
    Join Date
    Feb 2009
    Gender
    female
    Location
    http://mpgh.net MPGHCash: $700,458,011
    Posts
    1,196
    Reputation
    131
    Thanks
    2,233
    My Mood
    Buzzed
    add one more ")" to so it should look like this

    && HackStatus == true))

    the same with the other one

    && HackStatus == false))
    I Apologize for my latest release "CN Hack 7-11-11" I assure you it is not up to "CN Standard", and I feel bad due to all its flaws. I'm working hard, and steadily to remake it for I can bring everyone a hack they will really like!


    Support NSY Inject

    CoderNever
    GameArena
    _Fk127_
    ViSiON
    -Lunar_
    Bubbles Kittys

    Code:
    óN Mike says
    Cyber Bulling is bad
    J Whit says
    Yea bob wants to fuck my pussy
    óN Mike says
    Whit
    dont be a cyber bully
    J Whit says
    FUCK YOU
    óN Mike says
    Words hurt
    ѱ NOOB says
    whit gets bullied in school so he goes online and bullies kids online
    J Whit says
    DUH
    Stress relieve
    relieving
    The kintergarden kids beat my ass
    óN Mike says
    Thats just sad

  14. The Following 2 Users Say Thank You to CoderNever For This Useful Post:

    fearmeknowme (07-20-2010),GameTrainerMaker (07-20-2010)

  15. #10
    fearmeknowme's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    11
    Reputation
    10
    Thanks
    2
    My Mood
    Sneaky
    Thanks very much to everyone who helped me through this!! I just realised i'm more noob in C++ than i thought i was.... how i found that out? i never realised you could double click error to bring you to the error..... HAHA i'm such a noob!
    I actually learned quite a lot from this! You guys are the best~!


    Hey guys, i'm back... i just tested out the hack, and when i press the hotkey, nothing happens!! i feel like such a complete noob right now, here's the code:

    Code:
    #include <windows.h>
    
    bool IsGameReadyForHook()
    {
    if( GetModuleHandleA( "d3d9.dll" ) != NULL
    && GetModuleHandleA( "ClientFX.fxd" ) != NULL
    && GetModuleHandleA( "CShell.dll" ) != NULL )
    return true;
    return false;
    }
    
    void __cdecl PushToConsole( const char* szCommand )
    {
    DWORD *LTClient = ( DWORD* )( 0x3778BFB0 );
    void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
    __asm
    {
    push szCommand;
    call CONoff;
    add esp, -4-2+6+4
    }
    }
    void main()
    {
    bool HackStatus = false;
    while(true)
    {
    	if(GetAsyncKeyState(VK_NUMPAD1 <0 && HackStatus == true)){
    		PushToConsole("SkelModelStencil 0" );
    		HackStatus = false;
    	}
        if(GetAsyncKeyState(VK_NUMPAD1 <0 && HackStatus == false)){
            PushToConsole("SkelModelStencil -1" );
    		HackStatus = true;
    	}
    
    }
    }
    
    
    DWORD WINAPI dwHackThread(LPVOID)
    {
    while( !IsGameReadyForHook() )
    Sleep(100);
    main();
    return 0;
    }
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    DisableThreadLibraryCalls(hDll);
    if ( dwReason == DLL_PROCESS_ATTACH )
    {
    CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
    }
    return TRUE;
    }
    what am I doing wrong!! still trying to figure this out... :S

    EDIT:


    Hey guys, i'm back... i just tested out the hack, and when i press the hotkey, nothing happens!! i feel like such a complete noob right now, here's the code:

    Code:
    #include <windows.h>
    
    bool IsGameReadyForHook()
    {
    if( GetModuleHandleA( "d3d9.dll" ) != NULL
    && GetModuleHandleA( "ClientFX.fxd" ) != NULL
    && GetModuleHandleA( "CShell.dll" ) != NULL )
    return true;
    return false;
    }
    
    void __cdecl PushToConsole( const char* szCommand )
    {
    DWORD *LTClient = ( DWORD* )( 0x3778BFB0 );
    void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
    __asm
    {
    push szCommand;
    call CONoff;
    add esp, -4-2+6+4
    }
    }
    void main()
    {
    bool HackStatus = false;
    while(true)
    {
    	if(GetAsyncKeyState(VK_NUMPAD1 <0 && HackStatus == true)){
    		PushToConsole("SkelModelStencil 0" );
    		HackStatus = false;
    	}
        if(GetAsyncKeyState(VK_NUMPAD1 <0 && HackStatus == false)){
            PushToConsole("SkelModelStencil -1" );
    		HackStatus = true;
    	}
    
    }
    }
    
    
    DWORD WINAPI dwHackThread(LPVOID)
    {
    while( !IsGameReadyForHook() )
    Sleep(100);
    main();
    return 0;
    }
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    DisableThreadLibraryCalls(hDll);
    if ( dwReason == DLL_PROCESS_ATTACH )
    {
    CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
    }
    return TRUE;
    }
    what am I doing wrong!! still trying to figure this out... :S
    Last edited by fearmeknowme; 07-20-2010 at 07:01 PM.
    Respect list:
    CoderNever
    ac1d_buRn


  16. The Following User Says Thank You to fearmeknowme For This Useful Post:

    GameTrainerMaker (07-20-2010)

  17. #11
    Disturbed's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Posts
    10,405
    Reputation
    1063
    Thanks
    2,559
    Quote Originally Posted by fearmeknowme View Post
    Thanks very much to everyone who helped me through this!! I just realised i'm more noob in C++ than i thought i was.... how i found that out? i never realised you could double click error to bring you to the error..... HAHA i'm such a noob!
    I actually learned quite a lot from this! You guys are the best~!


    Hey guys, i'm back... i just tested out the hack, and when i press the hotkey, nothing happens!! i feel like such a complete noob right now, here's the code:

    Code:
    #include <windows.h>
    
    bool IsGameReadyForHook()
    {
    if( GetModuleHandleA( "d3d9.dll" ) != NULL
    && GetModuleHandleA( "ClientFX.fxd" ) != NULL
    && GetModuleHandleA( "CShell.dll" ) != NULL )
    return true;
    return false;
    }
    
    void __cdecl PushToConsole( const char* szCommand )
    {
    DWORD *LTClient = ( DWORD* )( 0x3778BFB0 );
    void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
    __asm
    {
    push szCommand;
    call CONoff;
    add esp, -4-2+6+4
    }
    }
    void main()
    {
    bool HackStatus = false;
    while(true)
    {
    	if(GetAsyncKeyState(VK_NUMPAD1 <0 && HackStatus == true)){
    		PushToConsole("SkelModelStencil 0" );
    		HackStatus = false;
    	}
        if(GetAsyncKeyState(VK_NUMPAD1 <0 && HackStatus == false)){
            PushToConsole("SkelModelStencil -1" );
    		HackStatus = true;
    	}
    
    }
    }
    
    
    DWORD WINAPI dwHackThread(LPVOID)
    {
    while( !IsGameReadyForHook() )
    Sleep(100);
    main();
    return 0;
    }
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    DisableThreadLibraryCalls(hDll);
    if ( dwReason == DLL_PROCESS_ATTACH )
    {
    CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
    }
    return TRUE;
    }
    what am I doing wrong!! still trying to figure this out... :S

    EDIT:


    Hey guys, i'm back... i just tested out the hack, and when i press the hotkey, nothing happens!! i feel like such a complete noob right now, here's the code:

    Code:
    #include <windows.h>
    
    bool IsGameReadyForHook()
    {
    if( GetModuleHandleA( "d3d9.dll" ) != NULL
    && GetModuleHandleA( "ClientFX.fxd" ) != NULL
    && GetModuleHandleA( "CShell.dll" ) != NULL )
    return true;
    return false;
    }
    
    void __cdecl PushToConsole( const char* szCommand )
    {
    DWORD *LTClient = ( DWORD* )( 0x3778BFB0 );
    void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
    __asm
    {
    push szCommand;
    call CONoff;
    add esp, -4-2+6+4
    }
    }
    void main()
    {
    bool HackStatus = false;
    while(true)
    {
    	if(GetAsyncKeyState(VK_NUMPAD1 <0 && HackStatus == true)){
    		PushToConsole("SkelModelStencil 0" );
    		HackStatus = false;
    	}
        if(GetAsyncKeyState(VK_NUMPAD1 <0 && HackStatus == false)){
            PushToConsole("SkelModelStencil -1" );
    		HackStatus = true;
    	}
    
    }
    }
    
    
    DWORD WINAPI dwHackThread(LPVOID)
    {
    while( !IsGameReadyForHook() )
    Sleep(100);
    main();
    return 0;
    }
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    DisableThreadLibraryCalls(hDll);
    if ( dwReason == DLL_PROCESS_ATTACH )
    {
    CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
    }
    return TRUE;
    }
    what am I doing wrong!! still trying to figure this out... :S
    Try doing it this way. It is the same concept.

    Probably some typos, I didn't look over it.
    Code:
    bool hack = false
    
      if(GetAsyncKeyState(VK_NUMPAD0)<0)
      {
         if( hack = false )
         {
          PushToConsole("BLAHBLAHBLAH 1");
          hack = true;
          Sleep(10);
         }
         if( hack = true )
         {
         PushToConsole("BLAHBLAHBLAH 0");
         hack = false;
         Sleep(10);
         }
      }


  18. #12
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,889
    Reputation
    163
    Thanks
    3,289
    My Mood
    Sleepy
    Another way :
    Code:
    if(GetAsyncKeyState(VK_NUMPAD0) < 0){
        hack = !hack;
        if(hack){
            Push("Hack 1");
        } else {
            Push("Hack 0");
        }
        Sleep(200);
    }
    Possibly even :
    Code:
    if(GetAsyncKeyState(VK_NUMPAD0) < 0){
        hack = !hack;
        char pushbuffer[50];
        sprintf_s(pushbuffer, 50, "Hack %d", hack);
        Push(pushbuffer);
        Sleep(200);
    }
    The second one depends on if it's a command where you use 0 or 1 like No Fog for example.

  19. #13
    fvestrgenrl's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    172
    Reputation
    9
    Thanks
    26
    Did they do like a silent patch? cause every time i try to use this it D/C's me... yet somehow it was working for him. and NX chams i made started D/C'ing as well

  20. #14
    Disturbed's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Posts
    10,405
    Reputation
    1063
    Thanks
    2,559
    Quote Originally Posted by fvestrgenrl View Post
    Did they do like a silent patch? cause every time i try to use this it D/C's me... yet somehow it was working for him. and NX chams i made started D/C'ing as well
    Use a different PTC method.


  21. The Following User Says Thank You to Disturbed For This Useful Post:

    fvestrgenrl (07-21-2010)

  22. #15
    GodHack2's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    645
    Reputation
    38
    Thanks
    762
    My Mood
    Amused
    Code:
    #include <windows.h>
    
    bool IsGameReadyForHook()
    {
    if( GetModuleHandleA( "d3d9.dll" ) != NULL
    && GetModuleHandleA( "ClientFX.fxd" ) != NULL
    && GetModuleHandleA( "CShell.dll" ) != NULL )
    return true;
    return false;
    }
    
    void __cdecl PushToConsole( const char* szCommand )
    {
    DWORD *LTClient = ( DWORD* )( 0x3778BFB0 );
    void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
    __asm
    {
    push szCommand;
    call CONoff;
    add esp, -4-2+6+4
    }
    }
    void main()
    {
    bool HackStatus = false;
    while(true)
    {
    	if(GetAsyncKeyState(VK_NUMPAD1 <0 && HackStatus == true)){
    		PushToConsole("SkelModelStencil 0" );
    		HackStatus = false;
    	}
        if(GetAsyncKeyState(VK_NUMPAD1 <0 && HackStatus == false)){
            PushToConsole("SkelModelStencil -1" );
    		HackStatus = true;
    	}
    
    }
    }
    
    
    DWORD WINAPI dwHackThread(LPVOID)
    {
    while( !IsGameReadyForHook() )
    Sleep(100);
    main();
    return 0;
    }
    BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    {
    DisableThreadLibraryCalls(hDll);
    if ( dwReason == DLL_PROCESS_ATTACH )
    {
    CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
    }
    return TRUE;
    }
    OPEN YOUR EYES PPL
    He NEEDS TO PUT ")" after the VK_NUMPAD1

Page 1 of 2 12 LastLast

Similar Threads

  1. [Tutorial] How to turn off no recoil in aIW HACK!
    By humanix1 in forum Call of Duty Modern Warfare 2 Private Servers
    Replies: 9
    Last Post: 07-10-2011, 05:18 AM
  2. anyone know how to turn off the range indicator?
    By iamsam in forum Combat Arms Hacks & Cheats
    Replies: 2
    Last Post: 01-07-2009, 06:46 PM
  3. How to turn off "Swear Filter"
    By lilxbyakuya in forum Combat Arms Hacks & Cheats
    Replies: 47
    Last Post: 09-22-2008, 08:43 PM
  4. [Tutorial] How to set hotkeys to more advanced hacks.
    By wr194t in forum Visual Basic Programming
    Replies: 13
    Last Post: 05-26-2008, 11:31 AM
  5. [Tutorial] How to set hotkeys to your basic hacks.
    By wr194t in forum Visual Basic Programming
    Replies: 4
    Last Post: 11-08-2007, 04:44 AM