Hi, i have created a simple triger bot for csgo and it works. But now i have changed the code a lot to organize and is giving me errors wich i can't solve.
The Errors:
gyazo.com/78f3153041bcc5c3884e5ba4ad980bce
GlobalVariables.h:
Code:
#pragma once
#include "stdafx.h"
#include "windows.h"
#include <string>
using namespace std;
/* Global Variables */
string const MODULE_NAME = "client.dll";
DWORD dwClient;
DWORD dwPlayer;
int myCrosshair;
DWORD id;
HANDLE CSHANDLE;
//Offsets
DWORD const dwLocalPlayer = 0xAA5834;
DWORD const dwEntityList = 0x4AC8014;
DWORD const m_fFlags = 0x100;
DWORD const m_iHealth = 0xFC;
DWORD const oTeam = 0xF0;
DWORD const m_iCrossHairID = 0xAA70;
DWORD const EntityLoopDitance = 0x10;
Memory.h:
Code:
#pragma once
#include "stdafx.h"
#include <iostream>
#include "windows.h"
#include <tlhelp32.h>
#include <string>
#include "GlobalVariables.h"
using namespace std;
void get_module(string module);
template <class output>
output read_memory(DWORD adress);
triger.h:
Code:
#pragma once
#include "stdafx.h"
#include "windows.h"
#include "GlobalVariables.h"
#include "Memory.h"
class triger
{
public:
void shoot(int *value);
~triger();
};
main.cpp
Code:
#include "stdafx.h"
#include "Memory.h"
#include "triger.h"
using namespace std;
int main()
{
int rnd = 1;
get_module(MODULE_NAME);
dwPlayer = read_memory<DWORD>(dwClient + dwLocalPlayer);
triger tr;
while (1)
{
tr.shoot(&rnd);
Sleep(1);
}
system("pause");
}
This was the first time that i divide a program in more than 2 files, and i think the program as something wrong with the includes but i already mess with it a while and didn't manage to resolve the problem.
I will not post memory.cpp and triger.cpp (Unless is really necessary) just for the hack stays private.