Fu$10N
Expert
- Joined
 - Mar 5, 2014
 
- Messages
 - 1,101
 
- Reaction score
 - 16
 
Hey guys  :urtheman:
So recently I installed Microsoft Visual Studio 2015. Needed it for making a triggerbot for CS:GO. I installed it, but I can't find that damn .exe to open visual c++ 2015. Here's the code for the triggerbot:
	
	
	
		
I installed Visual studio c++ 2015, restarted computer as required, but still can't find how to open the the c++. Anyone got any idea ? I might seem so noob asking this, but I really need some help.
P.S: Also, idk if the code is quite good, so if someone can find some mistakes there, please tell them here, so I might be able to fix it.
Paging doctors [member=5679]T3K[/member] [member=111]springfield[/member] [member=60]Opcode.eXe[/member] [member=21092]monday[/member]
			
			So recently I installed Microsoft Visual Studio 2015. Needed it for making a triggerbot for CS:GO. I installed it, but I can't find that damn .exe to open visual c++ 2015. Here's the code for the triggerbot:
		Code:
	
	#include <windows.h>
#include <tlhelp32.h>
#include <fstream>
#include "PatternScanner/PatternScannerMain.h"
DWORD dwEntityList, dwLocalPlayer, dwClient, dwTeam, dwCrosshairId, TriggerDelay, TriggerKey;
HANDLE hProcess;
DWORD GetModuleHandleByName(char* ModuleName, DWORD ProcID) {
	MODULEENTRY32 Entry;
	Entry.dwSize = sizeof(MODULEENTRY32);
	HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, ProcID);
	if (Module32First(hSnap, &Entry) == TRUE) {
		if (!_stricmp(Entry.szModule, ModuleName)) {
			DWORD hModule = (DWORD)Entry.modBaseAddr;
			return hModule;
		}
		else {
			while (Module32Next(hSnap, &Entry) == TRUE) {
				if (!_stricmp(Entry.szModule, ModuleName)) {
					DWORD hModule = (DWORD)Entry.modBaseAddr;
					return hModule;
				}
			}
			return 0;
		}
	}
	CloseHandle(hSnap);
}
HANDLE GetProcessHandleByName(char* ProcessName) {
	PROCESSENTRY32 Entry;
	Entry.dwSize = sizeof(PROCESSENTRY32);
	HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
	if (Process32First(hSnap, &Entry) == TRUE) {
		if (!_stricmp(Entry.szExeFile, ProcessName)) {
			HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, Entry.th32ProcessID);
			return hProc;
		}
		else {
			while (Process32Next(hSnap, &Entry) == TRUE) {
				if (!_stricmp(Entry.szExeFile, ProcessName)) {
					HANDLE hProc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, Entry.th32ProcessID);
					return hProc;
				}
			}
			return 0;
		}
	}
	CloseHandle(hSnap);
}
template <typename ReadType> ReadType Read(DWORD Address) {
	ReadType Data;
	ReadProcessMemory(hProcess, (LPVOID)(Address), &Data, sizeof(ReadType), 0);
	return Data;
}
int eGetTeam(int PlayerNumber) {
	return Read<int>((Read<DWORD>(dwClient + dwEntityList + (0x10 * PlayerNumber))) + 0xF0);
}
int eGetHealth(int PlayerNumber) {
	return Read<int>((Read<DWORD>(dwClient + dwEntityList + (0x10 * PlayerNumber))) + 0xFC);
}
void Click() {
	mouse_event(MOUSEEVENTF_LEFTDOWN, NULL, NULL, NULL, NULL);
	Sleep(5);
	mouse_event(MOUSEEVENTF_LEFTUP, NULL, NULL, NULL, NULL);
}
void ReadFile() {
	std::ifstream f("trigger.ini");
	std::string buf;
	int cur = 0;
	for (; std::getline(f, buf); cur++) {
		if (cur == 0) {
			std::istringstream ss(&buf[15]);
			ss >> TriggerDelay;
		}
		if (cur == 1) {
			std::istringstream ss(&buf[15]);
			ss >> std::hex >> TriggerKey;
		}
	}
	f.close();
}
void UpdateOffsets() {
    PatternScanner* ps = PatternScanner::Singleton();
    DWORD* offs = ps->getOffsets();
    dwEntityList = offs[POS_ENTITYLIST];
    dwLocalPlayer = offs[POS_LOCALPLAYER];
    dwCrosshairId = offs[POS_CROSSHAIRID];
    dwTeam = offs[POS_TEAMNUM];
}
int main() {
#ifdef NDEBUG
	HWND hWnd = GetConsoleWindow();
	ShowWindow(hWnd, SW_HIDE);
#endif
	hProcess = GetProcessHandleByName("csgo.exe");
	dwClient = GetModuleHandleByName("Client.dll", GetProcessId(hProcess));
	ReadFile();
    UpdateOffsets();
	while (!((GetKeyState(VK_F12) & 0x100) != 0)) {
		if ((GetKeyState(TriggerKey) & 0x100) != 0) {
			int cId = Read<int>((Read<DWORD>(dwClient + dwLocalPlayer)) + dwCrosshairId);
			int myTeam = Read<int>((Read<DWORD>(dwClient + dwLocalPlayer)) + dwTeam);
			if (cId > 0 && cId <= 64) {
				int eTeam = eGetTeam(cId - 1);
				int eHealth = eGetHealth(cId - 1);
				if (eTeam != 0 && eTeam != myTeam && (eHealth > 0)) {
					Sleep(TriggerDelay);
					Click();
				}
			}
		}
	}
}
	P.S: Also, idk if the code is quite good, so if someone can find some mistakes there, please tell them here, so I might be able to fix it.
Paging doctors [member=5679]T3K[/member] [member=111]springfield[/member] [member=60]Opcode.eXe[/member] [member=21092]monday[/member]