Don't be harsh on me, I'm new to C++, I only learned C so far, so i tried to Adapt the AssaultCube code to another game though I'm having problems with LGameWindow.
and it gives me this error,
error C2664: 'FindWindowW' : cannot convert parameter 2 from 'LPCSTR' to 'LPCWSTR'
C++:
#include <iostream>
#include <Windows.h>
#include <string>
#include <ctime>
void WriteToMemory(HANDLE hProcHandle);
DWORD FindDmaAddy(int PointerLevel, HANDLE hProcHandle, DWORD Offsets[], DWORD BaseAddress);
std::string GameName = "CABAL";
LPCSTR LGameWindow = "CABAL";
std::string GameStatus;
bool GameAvail;
bool UpdateOnNextRun;
//Combo Vars
bool ComboStatus;
BYTE ComboValue[] = {0x1, 0x1, 0x0, 0x0};
DWORD ComboBaseAdress = {0x065347E8};
DWORD ComboOffsets[] = {0x73B0};
int main()
{
HWND hGameWindow = NULL;
int timeSinceLastUpdate = clock();
int GameAvailTMR = clock();
int onePressTMR = clock();
DWORD dwProcID = NULL;
HANDLE hProcHandle = NULL;
UpdateOnNextRun = true;
std::string sComboStatus = "OFF";
while(!GetAsyncKeyState(VK_INSERT))
{
if(clock() - GameAvailTMR > 100)
{
GameAvailTMR = clock();
GameAvail = false;
hGameWindow = FindWindow(NULL, LGameWindow);
error C2664: 'FindWindowW' : cannot convert parameter 2 from 'LPCSTR' to 'LPCWSTR'