Results 1 to 13 of 13
  1. #1
    HaruShots's Avatar
    Join Date
    Feb 2014
    Gender
    male
    Location
    Somewhere on earth
    Posts
    145
    Reputation
    10
    Thanks
    1,381
    My Mood
    Busy

    How do I make a hotkey in C++ (GetAsyncKeyState) Thing

    Title says it all. How to make the hotkey I searched through the internet the results I get is the GetAsyncKeyState method. The full thing is

    bool hackname = 0;

    if (GetAsyncKeyState(VK_F3) & 1) {
    Beep(1000, 500);
    crosshair = !crosshair
    }

    I do not know what is the beep for but anyways I stole it from the web since I kept getting errors. Why is it the syntax error down there?
    Oh yes, this: error C2143: syntax error : missing ';' before '{'. (Someone explain this)

    This to :error C2447: '{' : missing function header (old-style formal list?)

    And IntelliSense expected a declaration ??? (EXPLAIN Please)
    Last edited by COD3RIN; 12-08-2014 at 06:43 PM.

  2. #2
    COD3RIN's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    Posts
    4,940
    Reputation
    315
    Thanks
    22,166
    My Mood
    Busy
    here
    void Hacks(){
    while(1)
    {


    if(GetAsyncKeyState(VK_Insert)&1)
    {


    Love you.
    ~Kenshit13
    Quote Originally Posted by cheaterman26 View Post
    COD3RIN PUT A BACKDOOR ON HIS OWN CHEAT HE HACK MY COMPUTER AND MY STEAM, DON'T TRUST THIS GUYS !

  3. #3
    MasterBed's Avatar
    Join Date
    Dec 2014
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    347
    the "beep" function for the sound when u press F3 i think.

  4. #4
    HaruShots's Avatar
    Join Date
    Feb 2014
    Gender
    male
    Location
    Somewhere on earth
    Posts
    145
    Reputation
    10
    Thanks
    1,381
    My Mood
    Busy
    Quote Originally Posted by MasterBed View Post
    the "beep" function for the sound when u press F3 i think.
    I see beep function is for the sound.

  5. #5
    HaruShots's Avatar
    Join Date
    Feb 2014
    Gender
    male
    Location
    Somewhere on earth
    Posts
    145
    Reputation
    10
    Thanks
    1,381
    My Mood
    Busy
    Quote Originally Posted by COD3RIN View Post
    here
    void Hacks(){
    while(1)
    {


    if(GetAsyncKeyState(VK_Insert)&1)
    {
    Thanks going to try it out .

  6. #6
    HaruShots's Avatar
    Join Date
    Feb 2014
    Gender
    male
    Location
    Somewhere on earth
    Posts
    145
    Reputation
    10
    Thanks
    1,381
    My Mood
    Busy
    if (Supercross)AeroMan->SuperCrosshair(pDevice, Supercross, GREEN, 15);
    void Crosshair(IDirect3DDevice9 *pDevice, DWORD defenition, DWORD Collor, DWORD Size);

    int draw = 0;
    void Hacks(){
    while (1)
    {
    if (GetAsyncKeyState(VK_INSERT) & 1)
    {
    if (draw){ draw = 1; }
    else { draw = 0; }
    }
    }
    }

    There is a syntax error in the "if" on the top help @COD3RIN
    And the IntelliSense thingy idk what happened -.-
    Last edited by HaruShots; 12-07-2014 at 08:19 AM.

  7. #7
    rullof's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    /root
    Posts
    166
    Reputation
    19
    Thanks
    1,711
    My Mood
    Aggressive
    Quote Originally Posted by HaruShots View Post

    Title says it all. How to make the hotkey I searched through the internet the results I get is the GetAsyncKeyState method. The full thing is

    bool hackname = 0;

    if (GetAsyncKeyState(VK_F3) & 1) {
    Beep(1000, 500);
    crosshair = !crosshair
    }

    I do not know what is the beep for but anyways I stole it from the web since I kept getting errors. Why is it the syntax error down there?
    Oh yes, this: error C2143: syntax error : missing ';' before '{'. (Someone explain this)

    This to :error C2447: '{' : missing function header (old-style formal list?)

    And IntelliSense expected a declaration ??? (EXPLAIN Please)
    You are missing a semi-column ( ; ) after ( crosshair = !crosshair ):

    Code:
    if (GetAsyncKeyState(VK_F3) & 1)
    {
        Beep(1000, 500);
        crosshair = !crosshair; // semi-column added
    }


    Hackers are not criminals. They're just having fun.




  8. #8
    HaruShots's Avatar
    Join Date
    Feb 2014
    Gender
    male
    Location
    Somewhere on earth
    Posts
    145
    Reputation
    10
    Thanks
    1,381
    My Mood
    Busy
    Quote Originally Posted by rullof View Post
    You are missing a semi-column ( ; ) after ( crosshair = !crosshair ):

    Code:
    if (GetAsyncKeyState(VK_F3) & 1)
    {
        Beep(1000, 500);
        crosshair = !crosshair; // semi-column added
    }
    Ouh thanks!

  9. #9
    HaruShots's Avatar
    Join Date
    Feb 2014
    Gender
    male
    Location
    Somewhere on earth
    Posts
    145
    Reputation
    10
    Thanks
    1,381
    My Mood
    Busy
    So I solved the problem except the if I mention to get a look at the codes here they are: @COD3RIN @rullof

    Last edited by HaruShots; 12-07-2014 at 08:51 AM.

  10. #10
    rullof's Avatar
    Join Date
    May 2014
    Gender
    male
    Location
    /root
    Posts
    166
    Reputation
    19
    Thanks
    1,711
    My Mood
    Aggressive
    Quote Originally Posted by HaruShots View Post
    So I solved the problem except the if I mention to get a look at the codes here they are: @COD3RIN @rullof

    The ( if ) statment ( The whole block ) is in the global scope, while the global scope only accepts declarations. You must put the ( if ) inside a function.

    Also an advice from me: "Stay away from programming"


    Hackers are not criminals. They're just having fun.




  11. #11
    HaruShots's Avatar
    Join Date
    Feb 2014
    Gender
    male
    Location
    Somewhere on earth
    Posts
    145
    Reputation
    10
    Thanks
    1,381
    My Mood
    Busy
    Quote Originally Posted by rullof View Post
    The ( if ) statment ( The whole block ) is in the global scope, while the global scope only accepts declarations. You must put the ( if ) inside a function.

    Also an advice from me: "Stay away from programming"
    Thanks for the advice and the explanation

  12. #12
    HaruShots's Avatar
    Join Date
    Feb 2014
    Gender
    male
    Location
    Somewhere on earth
    Posts
    145
    Reputation
    10
    Thanks
    1,381
    My Mood
    Busy
    @COD3RIN close thread please. Problem solved

  13. #13
    asianism's Avatar
    Join Date
    Oct 2011
    Gender
    female
    Location
    mpgh.net
    Posts
    76
    Reputation
    10
    Thanks
    791
    My Mood
    Amazed
    lol study the very basic first...

  14. The Following User Says Thank You to asianism For This Useful Post:

    izzatkulim101 (12-29-2014)

Similar Threads

  1. [Help] How to make a Hotkeys!
    By Glenox in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 14
    Last Post: 06-08-2012, 07:20 PM
  2. (HELP) how do I make hotkeys?
    By noobi4life in forum Visual Basic Programming
    Replies: 3
    Last Post: 12-05-2007, 03:15 PM
  3. Help! how do i make a jap warrock name?
    By gmgundamx7 in forum WarRock - International Hacks
    Replies: 4
    Last Post: 04-04-2007, 12:07 PM
  4. How'd you make these?
    By Twisty in forum Art & Graphic Design
    Replies: 1
    Last Post: 03-13-2007, 04:27 AM
  5. how can i make game hack?!!!!
    By UnknownID in forum General Game Hacking
    Replies: 2
    Last Post: 02-07-2006, 08:21 PM