Thread: Hotkeys

Page 1 of 2 12 LastLast
Results 1 to 15 of 21
  1. #1
    tempta43's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    980
    Reputation
    23
    Thanks
    295
    My Mood
    Bored

    Hotkeys

    I've been getting really frustrated with added hotkeys
    Heres my 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 PushToConsole(const char* Command) {
    DWORD CNADDIE = 0x007d9200;
    void* Send = ( void* )*( DWORD* )(CNADDIE);
    __asm
    {
    push Command;
    call Send; 
    add esp, -3-1+2+6;
    }
    }	
    void main()
    {
    	bool hack = false;
    while(true)
    {
    if(GetAsyncKeyState(VK_NUMPAD0) < 0){
        hack = !hack;
        if(hack){
            PushToConsole("SkelModelStencil 1");
        } else {
            PushToConsole("SkelModelStencil 0");
        }
        Sleep(200);
    }
    }
    }
    
    
    
    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?
    Thanks + Rep.

  2. #2
    dudemil's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Kansas
    Posts
    63
    Reputation
    9
    Thanks
    9
    My Mood
    Aggressive
    wow u dont know how to code do you

  3. #3
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,881
    Reputation
    163
    Thanks
    3,291
    My Mood
    Sleepy
    I don't understand.. what problem do you have?

  4. #4
    tempta43's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    980
    Reputation
    23
    Thanks
    295
    My Mood
    Bored
    It builds and all that, but the hotkey won't work ingame.

  5. #5
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,881
    Reputation
    163
    Thanks
    3,291
    My Mood
    Sleepy
    Add a sleep statement into your while loop to reduce lag. Also, you don't even need the dwHackThread it's useless..
    Add the IsGameReadyForHook into the main function before your while loop and change the createthread as well from dwHackThread.

  6. The Following User Says Thank You to Crash For This Useful Post:

    tempta43 (07-24-2010)

  7. #6
    scorpoistak's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    portland oregon
    Posts
    307
    Reputation
    21
    Thanks
    191
    add
    hack=true; first after ur first pushtoconsole
    then add
    hack=false; after ur second one

    then it would look like this:
    Code:
    if(GetAsyncKeyState(VK_NUMPAD0) < 0){
        hack = !hack;
        if(hack){
            PushToConsole("SkelModelStencil 1");
            hack=true;
        } else {
            PushToConsole("SkelModelStencil 0");
            hack=false;
    Last edited by scorpoistak; 07-24-2010 at 04:58 AM.

  8. #7
    BloodSkin's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Columbus, OH
    Posts
    353
    Reputation
    11
    Thanks
    63
    {
    if( GetModuleHandleA( "d3d9.dll" ) != NULL
    && GetModuleHandleA( "ClientFX.fxd" ) != NULL
    && GetModuleHandleA( "CShell.dll" ) != NULL )
    return true;
    return false;
    }


    wouldnt that return true, then return false? or does return work like "return to previous position and give this as a result" and only use the first return it sees?

  9. #8
    killerld's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Posts
    345
    Reputation
    11
    Thanks
    193
    My Mood
    Twisted
    The problem come from the function PushToConsole
    You have an error in this function

    Near the esp


    Sorry for my bad English ! I'm French Canadian !

    - When you use my hack, Please Thank Me

    Release some Hacks []
    Able to code in PhP / Mysql []
    Able to code in VB []
    Able to code in C# []
    Able to do VB Injector []
    Release an Injector []
    Active Member in the Community []
    Member who help small Hacker []

  10. #9
    o-o's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    who reading that ? T_T
    Posts
    682
    Reputation
    10
    Thanks
    307
    My Mood
    Cold
    I think i know what is the problem:

    if(GetAsyncKeyState(VK_NUMPAD0) < 0){
    hack = !hack;
    if(hack){
    PushToConsole("SkelModelStencil 0");
    } else {
    PushToConsole("SkelModelStencil 1");
    }

    Try This

  11. #10
    scorpoistak's Avatar
    Join Date
    Apr 2009
    Gender
    male
    Location
    portland oregon
    Posts
    307
    Reputation
    21
    Thanks
    191
    press return after the } after sleep(200)
    looks like this
    Code:
    Sleep(200)
    }                        <-------press return after this
                               <----------You get this 
    }
    }

  12. #11
    tempta43's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    980
    Reputation
    23
    Thanks
    295
    My Mood
    Bored
    Okay, i'm getting 50 different pieces of advice.
    What do you suggest I do..

  13. #12
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,881
    Reputation
    163
    Thanks
    3,291
    My Mood
    Sleepy
    Quote Originally Posted by o-o View Post
    I think i know what is the problem:

    if(GetAsyncKeyState(VK_NUMPAD0) < 0){
    hack = !hack;
    if(hack){
    PushToConsole("SkelModelStencil 0");
    } else {
    PushToConsole("SkelModelStencil 1");
    }

    Try This
    That's not the problem it's the exact same thing except it will start out differently by turning of NX cham when they aren't on.

  14. #13
    tempta43's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    980
    Reputation
    23
    Thanks
    295
    My Mood
    Bored
    Lmao, nvm.
    Seal, helped with with the code, and I made the newbiest mistake in the world.
    NumLock was off :P

  15. #14
    BloodSkin's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Columbus, OH
    Posts
    353
    Reputation
    11
    Thanks
    63
    Quote Originally Posted by tempta43 View Post
    Lmao, nvm.
    Seal, helped with with the code, and I made the newbiest mistake in the world.
    NumLock was off :P
    i had that problem too, which is why im looking into check the state of 2 keys at once. i just cant find any good documentation on GetAsyncKeyState

  16. #15
    MugNuf's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    790
    Reputation
    9
    Thanks
    160
    My Mood
    Goofy
    Quote Originally Posted by BloodSkin View Post
    i had that problem too, which is why im looking into check the state of 2 keys at once. i just cant find any good documentation on GetAsyncKeyState
    You may find this of some use:
    https://www.mpgh.net/forum/31-c-c/120...ckeystate.html

Page 1 of 2 12 LastLast

Similar Threads

  1. vb hotkeys
    By cjg333 in forum General Game Hacking
    Replies: 7
    Last Post: 07-23-2008, 01:08 PM
  2. Hotkeys in C++
    By Dave84311 in forum C++/C Programming
    Replies: 7
    Last Post: 09-07-2007, 07:13 AM
  3. My hack release hotkey v1
    By purenoob134 in forum WarRock - International Hacks
    Replies: 23
    Last Post: 07-13-2007, 07:56 PM
  4. Hotkeys for a VB trainer
    By scooby107 in forum Visual Basic Programming
    Replies: 10
    Last Post: 07-03-2007, 12:43 PM
  5. [Tutorial] How To Mack HotKeys On VB
    By TheRedEye in forum WarRock - International Hacks
    Replies: 32
    Last Post: 06-23-2007, 10:24 PM