Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused

    [C++] CA NA Hotkey?

    this is my main code:
    Code:
    void main()
    {
        bool walls = false;
        while(true)
    {
    if(GetAsyncKeyState(VK_INSERT)<0){       
                if(walls){ 
                    memcpy((LPVOID)0x57207A, "\x6A\x01", 2);
                    walls = false; 
                } else { 
                    memcpy((LPVOID)0x57207A, "\x6A\x00", 2);
                    walls = true; 
                } 
            }
    }
    }
    Does this look right?
    Because when I first press insert the glass walls activate then when I press again it deactivates.
    On the third attempt, it deactivates again and fourth attempt it deactivates again. After it activates... So screwed...

    How can I make it more consistent in activation?
    Am i placing my bool walls = false; in the wrong place?
    Last edited by ppl2pass; 07-10-2010 at 01:37 PM.

  2. #2
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,881
    Reputation
    163
    Thanks
    3,291
    My Mood
    Sleepy
    Just do
    walls = !walls;
    before the if statement.

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

    ppl2pass (07-10-2010)

  4. #3
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused
    nvm found it. it means if walls is not equal to walls.
    Doesnt make sense. :O HUH?
    Last edited by ppl2pass; 07-10-2010 at 02:02 PM.

  5. #4
    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 ppl2pass View Post
    what does
    walls = !walls;
    mean?
    Im here to learn as well
    ! is an operator reverses things.

    walls = !walls; makes walls the opposite of what it is.

    Another example is in an if statement :

    Code:
    if(!(x > 5)){ ... }
    That would be if x is less than 5.

    Why is that confusing. o.O

  6. #5
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused
    btw is it bool walls = !walls; ?
    Cause u have to define the variable?

  7. #6
    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 ppl2pass View Post
    btw is it bool walls = !walls; ?
    Cause u have to define the variable?
    Why would you declare it again ? You already have before the while loop.

    Code:
    void main()
    {
        bool walls = false;
        while(true)
        {
            if(GetAsyncKeyState(VK_INSERT)<0){     
                walls = !walls;  
                if(walls){ 
                    memcpy((LPVOID)0x57207A, "\x6A\x01", 2);
                } else { 
                    memcpy((LPVOID)0x57207A, "\x6A\x00", 2);
                }
                Sleep(300);
    
            }
            Sleep(10);
    
        }
    }

  8. The Following 2 Users Say Thank You to Crash For This Useful Post:

    ppl2pass (07-10-2010),supercarz1991 (07-10-2010)

  9. #7
    zmansquared's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    Kickin it at Microsoft
    Posts
    2,086
    Reputation
    36
    Thanks
    221
    My Mood
    Cheerful
    noob coders....
    Need Help With Coding or Something??? MSN me
    zmansquared@hotmail.com


    I am the one and only Microsoft Fag!!!

    Quote:
    Originally Posted by Arhk
    All games should be hacked, if we don't do it someone else will. Hackers force the progress, of better programming methods.
    ~


    Take this Pic everyone!



    next-

  10. #8
    ppl2pass's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Posts
    804
    Reputation
    5
    Thanks
    111
    My Mood
    Amused
    Quote Originally Posted by zmansquared View Post
    noob coders....
    you're noob compared to gordon

  11. #9
    zmansquared's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    Kickin it at Microsoft
    Posts
    2,086
    Reputation
    36
    Thanks
    221
    My Mood
    Cheerful
    am i? you dont know me kid
    Need Help With Coding or Something??? MSN me
    zmansquared@hotmail.com


    I am the one and only Microsoft Fag!!!

    Quote:
    Originally Posted by Arhk
    All games should be hacked, if we don't do it someone else will. Hackers force the progress, of better programming methods.
    ~


    Take this Pic everyone!



    next-

  12. #10
    Void's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Inline.
    Posts
    3,198
    Reputation
    205
    Thanks
    1,445
    My Mood
    Mellow
    Quote Originally Posted by zmansquared View Post
    am i? you dont know me kid
    https://www.mpgh.net/forum/31-c-c/126817-go-site.html

    Yeah, you are. You're pathetic argument with me in this thread gave me enough reason to disrespect you. Don't go around calling people noob coders when you hardly know anything yourself.

  13. #11
    zmansquared's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    Kickin it at Microsoft
    Posts
    2,086
    Reputation
    36
    Thanks
    221
    My Mood
    Cheerful
    why do you freaking always go back to that???? i can code, so idc what you think. talk to whit, and everyone else
    Need Help With Coding or Something??? MSN me
    zmansquared@hotmail.com


    I am the one and only Microsoft Fag!!!

    Quote:
    Originally Posted by Arhk
    All games should be hacked, if we don't do it someone else will. Hackers force the progress, of better programming methods.
    ~


    Take this Pic everyone!



    next-

  14. #12
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    6,285
    Reputation
    435
    Thanks
    3,715
    My Mood
    Doh
    from what i've seen so far...i'd rather have zman help me out then some1 who can't let a small argument in an online forum thread go...

  15. #13
    zmansquared's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    Kickin it at Microsoft
    Posts
    2,086
    Reputation
    36
    Thanks
    221
    My Mood
    Cheerful
    thank you. void has something against me for some reason. idk why, maybe cause i can out code him?

    let me know if you need help
    Need Help With Coding or Something??? MSN me
    zmansquared@hotmail.com


    I am the one and only Microsoft Fag!!!

    Quote:
    Originally Posted by Arhk
    All games should be hacked, if we don't do it someone else will. Hackers force the progress, of better programming methods.
    ~


    Take this Pic everyone!



    next-

  16. #14
    supercarz1991's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    6,285
    Reputation
    435
    Thanks
    3,715
    My Mood
    Doh
    wait...are you Gordon? as in sys?

    if u are, then hell yeah u can out code him lol

  17. #15
    zmansquared's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    Kickin it at Microsoft
    Posts
    2,086
    Reputation
    36
    Thanks
    221
    My Mood
    Cheerful
    maybe....you can decide
    Need Help With Coding or Something??? MSN me
    zmansquared@hotmail.com


    I am the one and only Microsoft Fag!!!

    Quote:
    Originally Posted by Arhk
    All games should be hacked, if we don't do it someone else will. Hackers force the progress, of better programming methods.
    ~


    Take this Pic everyone!



    next-

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