Results 1 to 13 of 13
  1. #1
    TehMarc's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    U.S.A.
    Posts
    6
    Reputation
    10
    Thanks
    2
    My Mood
    Confused

    Hotkeys super sensitive?

    If I go ingame and try to activate chams or boxes, the keys are super sensitive and when I press the hotkey it switches from off to on and so forth very rapidly. So I was wondering if there is a way to fix this, or is it just my keyboard that is doing this?

    Code:
    #include <windows.h>
    #include <time.h> 
    bool chams = false;
    bool hack = false; 
    bool Memoria( void * pDest, char * szPatch, size_t sSize )//NOP Function
    { 
        DWORD dwOrgProtect = NULL; 
        if ( !VirtualProtect ( pDest, sSize, PAGE_EXECUTE_READWRITE, &dwOrgProtect ))
            return FALSE;
    
        memcpy( pDest, szPatch, sSize ); 
        VirtualProtect( pDest, sSize, dwOrgProtect, NULL ); 
        return TRUE; 
    }  
    bool IsGameReadyForHook()
    {
    if( GetModuleHandleA( "d3d9.dll" ) != NULL
    && GetModuleHandleA( "ClientFX.fxd" ) != NULL
    && GetModuleHandleA( "CShell.dll" ) != NULL )
    return true;
    return false;
    }
     void __cdecl ConsolePush(char* sVal)
    {
        DWORD zAddress = 0x007D9200;
        void* szConsole = (void*)*(DWORD*)(zAddress);
        _asm
        {
            push sVal
            call szConsole
            add esp, 4
        }
    }
    void main() {
    while(true) {
    if(GetAsyncKeyState(VK_NUMPAD0) < 0){
        hack = !hack;
        if(hack){
            ConsolePush("SkelModelStencil 1"); //Nx Chams On
        } else {
            ConsolePush("SkelModelStencil 0"); //Nx Chams Off
    	}
    Sleep(100);
    }
    }
    }
    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;
    }
    Last edited by TehMarc; 07-22-2010 at 04:19 AM.

  2. #2
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,889
    Reputation
    163
    Thanks
    3,289
    My Mood
    Sleepy
    Make it 400 ms instead of 100 when you press the key.

  3. #3
    Reap3rô's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    My Mood
    Yeehaw
    Your code is this; (Noob C&P'er)

    if(GetAsyncKeyState(VK_NUMPAD0) < 0){
    hack = !hack;
    if(hack){
    ConsolePush("SkelModelStencil 1"); //Nx Chams On
    } else {
    ConsolePush("SkelModelStencil 0"); //Nx Chams Off
    }

    Make it;

    if(GetAsyncKeyState(VK_NUMPAD0) < 0 )
    //Panic Key
    {
    hack = !hack;
    if(hack)
    {
    ConsolePush("SkelModelStencil 0"); //Nx Chams Off
    //Add More Codes if you want.
    }

    }

    then after that;

    if(GetAsyncKeyState(VK_NUMPAD1) < 0 )
    //NX Chams
    {
    hack = !hack;
    if(hack)
    {
    ConsolePush("SkelModelStencil 1"); //Nx Chams On
    }

    }

  4. #4
    Solify's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    Frankfurt, Germany
    Posts
    2,291
    Reputation
    143
    Thanks
    2,473
    My Mood
    Aggressive
    add a Sleep timer in each hotkey

  5. #5
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,889
    Reputation
    163
    Thanks
    3,289
    My Mood
    Sleepy
    Quote Originally Posted by Reap3rô View Post
    Your code is this; (Noob C&P'er)

    if(GetAsyncKeyState(VK_NUMPAD0) < 0){
    hack = !hack;
    if(hack){
    ConsolePush("SkelModelStencil 1"); //Nx Chams On
    } else {
    ConsolePush("SkelModelStencil 0"); //Nx Chams Off
    }

    Make it;

    if(GetAsyncKeyState(VK_NUMPAD0) < 0 )
    //Panic Key
    {
    hack = !hack;
    if(hack)
    {
    ConsolePush("SkelModelStencil 0"); //Nx Chams Off
    //Add More Codes if you want.
    }

    }

    then after that;

    if(GetAsyncKeyState(VK_NUMPAD1) < 0 )
    //NX Chams
    {
    hack = !hack;
    if(hack)
    {
    ConsolePush("SkelModelStencil 1"); //Nx Chams On
    }

    }
    Why would he do that... that is a terrible idea. It just adds more hotkeys.

  6. #6
    Reap3rô's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0
    My Mood
    Yeehaw
    So.. He Can still do it, but i understand your point, if he uses your way, he can add more features.

  7. #7
    Revolvium's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    32
    Reputation
    10
    Thanks
    12
    Guys...
    Code:
    if(GetAsyncKeyState(VK_NUMPAD0)&1
    The &1 will use the LSB(Least Significant Bit). Essentially, once its picked up and called, the key is released. Prevents it from being super sensitive.

    Please, do not use a sleep or anything otherwise. That is a redneck fix.

    Any hoo, good luck.
    Last edited by Revolvium; 07-22-2010 at 05:03 AM.

  8. #8
    TehMarc's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    U.S.A.
    Posts
    6
    Reputation
    10
    Thanks
    2
    My Mood
    Confused
    Quote Originally Posted by Reap3rô View Post
    Your code is this; (Noob C&P'er)

    if(GetAsyncKeyState(VK_NUMPAD0) < 0){
    hack = !hack;
    if(hack){
    ConsolePush("SkelModelStencil 1"); //Nx Chams On
    } else {
    ConsolePush("SkelModelStencil 0"); //Nx Chams Off
    }

    Make it;

    if(GetAsyncKeyState(VK_NUMPAD0) < 0 )
    //Panic Key
    {
    hack = !hack;
    if(hack)
    {
    ConsolePush("SkelModelStencil 0"); //Nx Chams Off
    //Add More Codes if you want.
    }

    }

    then after that;

    if(GetAsyncKeyState(VK_NUMPAD1) < 0 )
    //NX Chams
    {
    hack = !hack;
    if(hack)
    {
    ConsolePush("SkelModelStencil 1"); //Nx Chams On
    }

    }
    There is exactly a lot more to my original code, so don't call me a Noob C+P'er until you see the original thing ok? Which you probably won't. The code in the first post is just a example of my problem.

  9. #9
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,889
    Reputation
    163
    Thanks
    3,289
    My Mood
    Sleepy
    Quote Originally Posted by Revolvium View Post
    Guys...
    Code:
    if(GetAsyncKeyState(VK_NUMPAD0)&1
    The &1 will use the LSB(Least Significant Bit). Essentially, once its picked up and called, the key is released. Prevents it from being super sensitive.

    Please, do not use a sleep or anything otherwise. That is a redneck fix.

    Any hoo, good luck.
    Sleeping helps you grow though.

  10. #10
    Revolvium's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    32
    Reputation
    10
    Thanks
    12
    Quote Originally Posted by Sealionone View Post
    Sleeping helps you grow though.
    Actually, I'm a bit upset now. They are calling each other cpers without realizing that they themselves don't understand the basics of C++
    =\

    But yeah, the &1 is the most efficient way to do this

  11. #11
    BloodSkin's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    Columbus, OH
    Posts
    354
    Reputation
    11
    Thanks
    63
    Quote Originally Posted by Revolvium View Post
    Actually, I'm a bit upset now. They are calling each other cpers without realizing that they themselves don't understand the basics of C++
    =\

    But yeah, the &1 is the most efficient way to do this
    vouch this. tried looking it up in c++ for dummies and couldnt find it, so i had spent a few hours surfing the web looking for explinations of GetAsyncKeyState. its a lot more simple than i thought.

  12. #12
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,889
    Reputation
    163
    Thanks
    3,289
    My Mood
    Sleepy
    Quote Originally Posted by Revolvium View Post
    Actually, I'm a bit upset now. They are calling each other cpers without realizing that they themselves don't understand the basics of C++
    =\

    But yeah, the &1 is the most efficient way to do this
    I guess that would be better. I just use the things that work for me and don't really change them. /

  13. #13
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,561
    Reputation
    127
    Thanks
    5,912
    My Mood
    Happy
    Question has been solved
    /Closed
    -Rest in peace leechers-

    Your PM box is 100% full.

Similar Threads

  1. [Help] Is there a hotkey or application for mouse sensitivity?
    By acedia in forum CrossFire Spammers, Injectors and Multi Tools
    Replies: 10
    Last Post: 03-07-2011, 09:21 AM
  2. SUPER Spammer + hotkeys + ingame message changer
    By hopefordope in forum Combat Arms Spammers, Injectors and Multi Tools
    Replies: 14
    Last Post: 01-30-2010, 06:59 AM
  3. super jump hotkeys
    By boyd45 in forum Visual Basic Programming
    Replies: 2
    Last Post: 05-08-2008, 08:26 AM
  4. Hotkeys in C++
    By Dave84311 in forum C++/C Programming
    Replies: 7
    Last Post: 09-07-2007, 08:13 AM
  5. super sig request (hope it isint too much O_O)
    By NukeAssault in forum Help & Requests
    Replies: 6
    Last Post: 02-06-2006, 11:13 AM