Results 1 to 4 of 4
  1. #1
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty

    How does this work?!

    I don't think Im the only one who has been seeing this a lot lately:
    Code:
    if(GetAsyncKeyState(vk_code)<0)
    Now I don't know how in the world this could work, but some how it is returning true when some people press the correct key, when in reality it should always return false. I know some of you are like: "Well if it works who cares?", but this is a problem it shows a serious inconsistency and I would like to find out why. If anyone has any ideas please share them.

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  2. #2
    Joshcarr2006's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Location
    ☠☆★☆★☆☠
    Posts
    11,015
    Reputation
    917
    Thanks
    2,901
    My Mood
    Lurking
    Did you try


    If 1=true then 0=false,Key1=1,if hit,Key1=0,if hitx2,


    /idk what i'm talking about.
    [IMG]https://i30.photobucke*****m/albums/c335/Joshcarr2006/tumblr_lz1nrntuZf1qdxcglo1_500_zps0388a33f.gif[/IMG]

  3. #3
    Retoxified's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Posts
    148
    Reputation
    8
    Thanks
    171
    Ask BA, he's god o__O
    probably because GetAsyncKeyState doesn't function properly on modern computers with their fancy multicores and being able to process way too many shizzle at the same time.

  4. #4
    why06's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    IBM
    Posts
    4,304
    Reputation
    170
    Thanks
    2,203
    My Mood
    Flirty
    Yes but I dont see how getakeysync could be a problem because ... hmmm hold on a sec....

    Testing.... yep thats it!
    Code:
    #include <iostream.h>
    #include <windows.h>
    using namespace std;
    
    int main()
    {
        while(1)
        {
                cout<<GetAsyncKeyState(VK_SPACE);
                Sleep(200);
        }
        return 1;
    }
    I forgot GetAsyncKeyState returns a signed WORD value. So it actually returns a negative number when it's pressed because the highest bit is set to 1. That is how the whole < 0 thing works. since GetAsyncKeyState is less then zero when pressed, but goddam why go through so much trouble. any nonzero is true... =/

    "Every gun that is made, every warship launched, every rocket fired signifies, in the final sense, a theft from those who hunger and are not fed, those who are cold and are not clothed. This world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children. The cost of one modern heavy bomber is this: a modern brick school in more than 30 cities. It is two electric power plants, each serving a town of 60,000 population. It is two fine, fully equipped hospitals. It is some fifty miles of concrete pavement. We pay for a single fighter plane with a half million bushels of wheat. We pay for a single destroyer with new homes that could have housed more than 8,000 people. This is, I repeat, the best way of life to be found on the road the world has been taking. This is not a way of life at all, in any true sense. Under the cloud of threatening war, it is humanity hanging from a cross of iron."
    - Dwight D. Eisenhower

  5. The Following User Says Thank You to why06 For This Useful Post:

    Retoxified (03-26-2010)

Similar Threads

  1. How does this work?
    By Spookerzz in forum General
    Replies: 11
    Last Post: 10-11-2010, 03:29 AM
  2. how does wallhack work?
    By billythekid1 in forum WarRock Discussions
    Replies: 5
    Last Post: 10-15-2009, 12:03 PM
  3. Does this work?
    By 19900606 in forum General
    Replies: 5
    Last Post: 10-12-2009, 02:16 PM
  4. How does this work?
    By Jakeoff10 in forum Combat Arms Hacks & Cheats
    Replies: 1
    Last Post: 12-22-2008, 07:51 AM
  5. OGKeys - How does it work?
    By foxhound in forum WarRock - International Hacks
    Replies: 5
    Last Post: 07-04-2008, 11:54 PM