[C++]Need Help With BF3 Auto pressing "Q"

Posts 112 of 12 · Page 1 of 1
[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.
Quote Originally Posted by AraaasH View Post
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.
Hmm, Alright, So you're saying that this wont work?
Quote Originally Posted by ERGaergaergaergaergearg View Post
Hmm, Alright, So you're saying that this wont work?
Not in my knowledge, maybe there's a way to get around it. Don't give up just like I did
Quote Originally Posted by AraaasH View Post
Not in my knowledge, maybe there's a way to get around it. Don't give up just like I did
I'll try my best, even thou im a newbie xD
i got a program but its not aprroved its a script too
Quote Originally Posted by selimkose View Post
i got a program but its not aprroved its a script too
Hmm, Could you please send it too me and i'll check it out?
"send it to me" he can send you a keylogger, you that stupid?
Quote Originally Posted by lhikary View Post
"send it to me" he can send you a keylogger, you that stupid?
Yeah, I am that stupid, Prob? o.O
Lol, before touching the file you could check it. its not stupid to accept unknown files. Just be awared of scanning/checking code before opening.


About the topic:
if you would transfer your code to C# (.NET) i could help you out. I am highly skilled on C# (.NET). with C# .NET/VB.NET you could include DirectX elements to do ESP and Radar for example.
Posts 112 of 12 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

Need help?