[C++]Need Help With BF3 Auto pressing "Q"
Hey everyone, I'm extremely new to c++.
I need help with a very simple auto press Q program to spot people automaticlly.
The code:
Code:
#include <iostream>
#include <Windows.h>
#include "conio.h"
using namespace std;
int main(){
HWND windowHandle = FindWindow(0, ("Battlefield 3™"));
INPUT *key;
if(windowHandle == NULL){
cout << "Didn't Found The Game..." << endl;
_getch();
}
else{
cout << "Autopressing W";
SetForegroundWindow(windowHandle);
Sleep(1000);
key = new INPUT;
key->type = INPUT_KEYBOARD;
key->ki.time = 0;
key->ki.wScan = 0;
key->ki.dwExtraInfo = 0;
while(true){
if(GetAsyncKeyState(VK_F5)){
exit(0);
}
key->ki.wVk = 0x51;
key->ki.dwFlags = 0;
SendInput(1,key,sizeof(INPUT));
Sleep(1000);
}
_getch();
}
}
The prob is, when i run the program, the camera is just rotating right all the time...Does this have something about the game's anti-hack or something?
I'm not any pro at it, not even nooby, but I'm sure that's not PunkBuster's fault.
Alright, Thank you. Bcuz it's pretty clear in the code, that it is pressing button Q and no rotating mouse xD
I've tried millions of times to get this to work.
I managed to loop a key pressing until i press another key, but it's useless since I have to restart the script every time I stop the loop.
i got a program but its not aprroved its a script too
"send it to me" he can send you a keylogger, you that stupid?