Hello,
I got a problem:
I am currently writing a dll for COD MW3 and I'm trying to do a wallhack.
For that i need the correct stride number and to find that out I increase an int every time I type the NUM1 key on my keyboard.
The current int is displayed on the screen.
My problem is that the number displayed on the screen increases by one the first time I type NUM1, but the second time it increases by 10 and then by one agin, the third time it increases by 89 so I am at 100.
I think that the problem could be
A: here:
Code:
if (GetAsyncKeyState(VK_NUMPAD0)&1)
{
strideNum +=1;
}
or B: here:
Code:
char buffer[20];
_itoa_s(strideNum,buffer,20,2);
LPCSTR p = buffer;
Draw_Text(p, 200, 5, txtGreen, HeaderFont);
Maybe it could have something to do with the conversion of the int to a LPCSTR that can be drawn on the screen.
I hope that there will be some good answers soon
EDIT:
Maybe I should mention that if I decrease the number it decreases in exactly the same steps that it increased before.