Sniper's TriggetBot (C++)
Code:
#include "stdafx.h"
#include "windows.h"
#include <iostream>
#include <stdio.h>
using namespace std;
HDC hdcScreen;
COLORREF startPixel;
COLORREF nowPixel;
void shoot(){
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
Sleep(50);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
}
int _tmain(int argc, _TCHAR* argv[])
{
bool started = false;
hdcScreen = GetDC(0);
while(true){
Sleep(10);
if(GetAsyncKeyState(VkKeyScan('h'))){
if(started != false){
started = true;
startPixel = GetPixel(hdcScreen, 802, 452); //Change to middle pixel of your screen if resolution is different.
}
nowPixel = GetPixel(hdcScreen, 802, 452); //Change to middle pixel of your screen if resolution is different.
if((int)GetRValue(startPixel) - (int)GetRValue(nowPixel) > 5 || (int)GetRValue(startPixel) - (int)GetRValue(nowPixel) < -5){
shoot();
started = true;
}
}
}
ReleaseDC(0, hdcScreen);
return 0;
}
Basic explanation on works:
0.Set your CS:GO to fullscreen windowed mode.
1.Gets pixel in middle of screen when you hold H.
2.If that pixel changes it fires.
(I could implement so that it finds the middle itself, but everyone has a different crosshair)

