Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,406
    Reputation
    157
    Thanks
    3,991
    My Mood
    Flirty

    [Help] Controllable Hotkeys

    Hey guys.

    Im trying to make a controllable hotkey.
    Say with speedhack, Each time the hotkey is pressed/held it will add/subtract a value from the origional PushToConsole.

    How would i do this?

    I have tried to do it like this, But its not working. Can anyone help me please?


    [php]
    int XPos = 200;
    char PushX[20];

    if(GetAsyncKeyState(VK_NUMPAD1)&1)
    {
    XPos = XPos - 100;
    sprintf(PushX,"MyCommad %d", XPos);
    Push(PushX);
    }
    [/php]

    Help appreciated.

  2. #2
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,706
    Reputation
    907
    Thanks
    7,296
    My Mood
    Mellow
    Quote Originally Posted by ac1d_buRn View Post
    Hey guys.

    Im trying to make a controllable hotkey.
    Say with speedhack, Each time the hotkey is pressed/held it will add/subtract a value from the origional PushToConsole.

    How would i do this?

    I have tried to do it like this, But its not working. Can anyone help me please?


    [php]
    int XPos = 200;
    char PushX[20];

    if(GetAsyncKeyState(VK_NUMPAD1)&1)
    {
    XPos = XPos - 100;
    sprintf(PushX,"MyCommad %d", XPos);
    Push(PushX);
    }
    [/php]

    Help appreciated.
    Sorry I'm not too C++ savvy, but could you add a

    [php]
    while(GetAsyncKeyState(VK_NUMPAD1)<0)
    {
    XPos -= 100;
    //yadda yadda
    }
    [/php]

    So while the key is held down, do whatever?

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  3. The Following User Says Thank You to Jason For This Useful Post:

    ac1d_buRn (08-05-2010)

  4. #3
    TheFallenOwns's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Posts
    149
    Reputation
    10
    Thanks
    43
    Code:
    if(GetAsyncKeyState(VK_F1)&1){
    if(SPEED == 100){
       SPEED = 0;
    }
    else{
       SPEED+= 10;
    }
    }
    if(Speehack){
     PushToConsole("speed "+SPEED);// i know speed isnt the actual command but yeah
    }
    btw remeber between the console command and the value put a space befor ending quotes
    and you can change the value of SPEED to a float so that its the actual value
    hope it helps!

    Quote Originally Posted by J-Deezy View Post


    Sorry I'm not too C++ savvy, but could you add a

    [php]
    while(GetAsyncKeyState(VK_NUMPAD1)<0)
    {
    XPos -= 100;
    //yadda yadda
    }
    [/php]

    So while the key is held down, do whatever?
    dont use < 0 it makes it go fast use that for holding a button down other wise use &1

  5. The Following 3 Users Say Thank You to TheFallenOwns For This Useful Post:

    ac1d_buRn (08-05-2010),GodHack2 (08-05-2010),jonnyboy9985 (08-09-2010)

  6. #4
    dugindog's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Location
    jasper mn
    Posts
    189
    Reputation
    7
    Thanks
    7
    My Mood
    Twisted
    thank you!

  7. #5
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,706
    Reputation
    907
    Thanks
    7,296
    My Mood
    Mellow
    Quote Originally Posted by TheFallenOwns View Post
    dont use < 0 it makes it go fast use that for holding a button down other wise use &1
    Yes, I'm aware of that, however:

    Quote Originally Posted by ac1d_buRn
    Each time the hotkey is pressed/held

    My example was for the "held down" part of his request.

    If necessary a sleep function can be implemented before the end of the loop.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  8. #6
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,406
    Reputation
    157
    Thanks
    3,991
    My Mood
    Flirty
    Thanks guys. Ill test this out later.

  9. #7
    tahha's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    my keyboard or my bed
    Posts
    122
    Reputation
    9
    Thanks
    3
    i have a completly working but different way
    add the vars
    Code:
    int speeda = 70;
    int speedb = 285;
    int speedc = 285;
    int speedd = 285;
    and this is the hotkey part
    Code:
    //speed
    //Left{-1}/Right{+1}/end{Default}
    char speeder[255];
    if(GetAsyncKeyState(VK_END)<0){
    	speeda = 70;
    	speedb = 285;
    	speedc = 285;
    	speedd = 285;
    }
    
    if(GetAsyncKeyState(VK_LEFT)<0){
    	speeda = speeda - 50;
    	speedb = speedb - 50;
    	speedc = speedc - 50;
    	speedd = speedd - 50;
    }
    
    if(GetAsyncKeyState(VK_RIGHT)<0){
    	speeda = speeda + 50;
    	speedb = speedb + 50;
    	speedc = speedc + 50;
    	speedd = speedd + 50;
    }
    
    sprintf(speeder,"WalkVel %d",speeda);
    PTC(speeder);
    
    sprintf(speeder,"FRunVel %d",speedb);
    PTC(speeder);
    
    sprintf(speeder,"BRunVel %d",speedc);
    PTC(speeder);
    
    sprintf(speeder,"SRunVel %d",speedd);
    PTC(speeder);
    
    Sleep(50);
    works perfect for what ur after i think

    im not sure about the held down part tho
    i never tried holding down my hotkeys

    but its worth a shot


    i also have this for virtual jump if you want that
    but if i find out u use my code with out credits i will hurt ur computer jk
    but for reals give credits if u use
    Last edited by tahha; 08-05-2010 at 01:57 PM.

  10. #8
    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
    Quote Originally Posted by ac1d_buRn View Post
    Thanks guys. Ill test this out later.
    Solved or not?
    -Rest in peace leechers-

    Your PM box is 100% full.

  11. #9
    tahha's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    my keyboard or my bed
    Posts
    122
    Reputation
    9
    Thanks
    3
    @ zoom
    where the do come from...its like r not here one day then like a day later the entire section is clean and modded lol

  12. #10
    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
    Quote Originally Posted by tahha View Post
    @ zoom
    where the do come from...its like r not here one day then like a day later the entire section is clean and modded lol
    Sweden.

    I was on a 3 days vacation, lol

    VM system next time, thank you.
    -Rest in peace leechers-

    Your PM box is 100% full.

  13. #11
    tahha's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    my keyboard or my bed
    Posts
    122
    Reputation
    9
    Thanks
    3
    oh kool and sorry i will vm.
    i forgot that was there lol
    i havent been on mpgh in a while.

  14. #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 moallem View Post
    tnx goods code
    Spam less pl0xz

  15. #13
    Synns's Avatar
    Join Date
    May 2007
    Gender
    male
    Posts
    5,176
    Reputation
    170
    Thanks
    2,554
    My Mood
    Bitchy
    tnx goods code

  16. #14
    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 Crash View Post
    Spam less pl0xz
    Quote Originally Posted by Tyrannus View Post
    tnx good codes
    Spam less pl0xz.

  17. #15
    Synns's Avatar
    Join Date
    May 2007
    Gender
    male
    Posts
    5,176
    Reputation
    170
    Thanks
    2,554
    My Mood
    Bitchy
    I CAN GO ALL DAY NIG.

    tnxs good code

Page 1 of 2 12 LastLast

Similar Threads

  1. [HELP] Tapper Hotkeys
    By Jązzą_ in forum Visual Basic Programming
    Replies: 1
    Last Post: 10-30-2009, 06:32 PM
  2. Mass help with Hotkeys Warrock
    By araz in forum Visual Basic Programming
    Replies: 3
    Last Post: 03-23-2008, 09:04 PM
  3. [Help] Mouse Hotkeys
    By ilovepie21 in forum Visual Basic Programming
    Replies: 1
    Last Post: 03-09-2008, 07:22 AM
  4. [HELP] VB6 Hotkey for Zoom not working
    By SteeL in forum WarRock - International Hacks
    Replies: 13
    Last Post: 11-10-2007, 04:06 AM
  5. [Help]With Hotkeys..
    By dor619 in forum Visual Basic Programming
    Replies: 2
    Last Post: 10-14-2007, 01:03 PM