C++ Hack

Posts 1–12 of 12 · Page 1 of 1
C++ Hack
So i am trying to make a hack. It has turned out ok but I have an issue. They dont work. I made this for CA and I have it inject into CA but i cant get it to work any ideas?

Code:
if(GetAsyncKeyState(0x41))
{
        //Hack Code Here
}
any suggestions I am trying to go w/o the d3d menue
Can you be more specific? How the hack works... DLL, Trainer, WriteProcessMemory(), errors?, injected properly?, what the hack does and how it does it basically. That or post the source code.
Make sure you have the right virtual key code and put that statement in an infinite loop. I'm assuming you don't have that, I can't tell much from what you've given us.
Quote Originally Posted by FMLoon View Post
So i am trying to make a hack. It has turned out ok but I have an issue. They dont work. I made this for CA and I have it inject into CA but i cant get it to work any ideas?

Code:
if(GetAsyncKeyState(0x41))
{
        //Hack Code Here
}
any suggestions I am trying to go w/o the d3d menue
You're using GetAsyncKeystate wrong, //Hack Code Here is a comment, not coding, I hope you actually had code that went there. o_o
Quote Originally Posted by ilovecookies View Post
You're using GetAsyncKeystate wrong, //Hack Code Here is a comment, not coding, I hope you actually had code that went there. o_o
What do you mean he's using it wrong?
if(GetAsyncKeyState(0x41)&1) //A Key
{
dwStartHack();
}

Try that. With the &1 it will use LSB (the least significant bit), basically, it will be picked up and called when the key is released.

Edit: fixed major mistake, sorry bout that.
Quote Originally Posted by Faith View Post
if(GetAsyncKeyState(0x41)&1) //A Key
{
dwStartHack();
}

Try that. With the &1 it will use MSB (the most significant bit), basically, it will be picked up and called when the key is released.
Wait what?!

&1 is obviously the Least Significant bit. Hence why it is one o_O. The MSB yould be 2^7 = 128 or 0x80

EDIT: but hey good to see u again Faith.
Is that your whole code?
Im guessing it isnt, As you need your hackthread and stuff.

Also, I thing this works well too. (Easier to know the hotkeys)

Code:
if (GetAsyncKeyState(VK_NUMPAD1))
{
//hack here
}
you put in the wrong code <.<
Quote Originally Posted by FMLoon View Post
So i am trying to make a hack. It has turned out ok but I have an issue. They dont work. I made this for CA and I have it inject into CA but i cant get it to work any ideas?

Code:
if(GetAsyncKeyState(0x41))
{
        //Hack Code Here
}
any suggestions I am trying to go w/o the d3d menue

Copy & paste more. ^^^^
After looking into it why06, it appears you were right. I was mis*******d my mistake.
I always thought that the &1 was testing for the most significant bit and never bothered to go further into looking at it. But thanks for bringing it to my attention, I wont make that mistake again.
Quote Originally Posted by Faith View Post
After looking into it why06, it appears you were right. I was mis*******d my mistake.
I always thought that the &1 was testing for the most significant bit and never bothered to go further into looking at it. But thanks for bringing it to my attention, I wont make that mistake again.
It's no big. I still for the life of me can't understand which bit tests what.... I think its LSB tests if key is released... or MSB if it is pressed again... hell idk. Never had to use it. =/
Posts 1–12 of 12 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?