Jump to content
Welcome, Guest
Existing user? Sign In

Sign In



Sign Up
The MatriX
  • Welcome To Ghbsys
  • CS GO Streaming Version is released. Have fun streaming while cheating!
  • Have a Payment Issue? Send us a Support ticket.
  • Make a thread if you need support or join our discord for live support.
  • Have Suggestions? Make a thread and you'll earn Ghbsys Points for implemented suggestions.
  • Join our discord to stay well connected! Don't forget to integrate your discord to the site
  • Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum

    Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of [GHB] - GAmEhAcKbAsTaRdS Forum by signing in or creating an account.
    • Start new topics and reply to others
    • Subscribe to topics and forums to get email updates
    • Get your own profile page and make new friends
    • Send personal messages to other members.

    C++ Hotkey Function


    NeoIII
     Share

    Recommended Posts

    Main Function by Neo I.I.I

     

    Virtual Key Codes: http://d4rc.net/d4/?cmd=vkeylist

    bool cpHTK( int vKey_Hold, int vKey_Press )
    {
    if( vKey_Hold == NULL ) {
    	if( GetAsyncKeyState( vKey_Press ) &1 ) {
    		return true;
    	}
    } 
    if( vKey_Press == NULL ) {
    	if( GetAsyncKeyState( vKey_Hold ) ) {
    		return true;
    	}
    }
    if( vKey_Hold != NULL && vKey_Press != NULL ) {
    	if( GetAsyncKeyState( vKey_Hold ) && GetAsyncKeyState( vKey_Press ) &1 ) {
    		return true;
    	}
    }
    return false;
    }

    in header:

    bool cpHTK( int vKey_Hold, int vKey_Press );

     

    how to use:

    if( cpHTK( NULL, 0x1 ) ) { cvar.htk3 = !cvar.htk3; }

     

    Parameter1: vKey_Hold ---> use for key to hold down!

    Parameter2: vKey_Press ---> use that for single pressed key's!

     

    if you set the first or second parameter to 'NULL' it wouldnt check the parameter

    Edited by wizite
    • Upvote 1
    Link to comment
    Share on other sites

    Der Kompilier gibt den folgenden Fehler aus.

     

    error C3861: 'GetAsyncKeyState': identifier not found, even with argument-dependent lookup
    ...
    error C2365: 'GetAsyncKeyState' : redefinition; previous definition was a 'formerly unknown identifier'

     

     

    edit:

    Ich hab ne Lösung gefunden, ich brauch ja die windows.h.

     

     

    PS:

    Lustiges Spiel, Alt Taste gedrückt halten und dan eine Zahl eingaben und loslassen.

    ALT + 1 = ☺

    ALT + 989 = ¦

    Edited by SWW13
    Link to comment
    Share on other sites

    • 5 months later...
    • 8 months later...
    • 9 months later...
    • 8 months later...
    • 1 year later...
    • 1 month later...
    Guest
    This topic is now closed to further replies.
     Share

    • Recently Browsing   0 members

      • No registered users viewing this page.
    ×
    ×
    • Create New...