Solved Triggerbot

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

sup3241

Newbie
Sep 2, 2016
2
32
0
Hey guys! i'm very need to game hacking and right now i'm trying to make a triggerbot and i think i understand how it works but for some reason i can't get it to work.. Would you please help me to understand how to fix it?

#include "ProcMem.h"
#include <iostream>

ProcMem Mem;

using namespace std;


const DWORD playerBase = 0x4C6708;
const DWORD entityBase = 0x4D3904;
const DWORD crosshairOffset = 0x14D4;

const DWORD teamOffset = 0x9c;
const DWORD healthOffset = 0x94;
const DWORD EntLoopDist = 0x10;

DWORD ClientDll;
DWORD localPlayer;

int CrossHairID;
int localTeam;

void TriggerBot();

int main()
{
Mem.Process("hl2.exe");
DWORD ClientDll = Mem.Module("client.dll");

localPlayer = Mem.Read<DWORD>(ClientDll + playerBase);
localTeam = Mem.Read<int>(localPlayer + teamOffset);
CrossHairID = Mem.Read<int>(localPlayer + crosshairOffset);

while(true)
{
TriggerBot();
Sleep(250);
}

}

void TriggerBot()
{
DWORD EnemyInCH = Mem.Read<DWORD>(ClientDll + entityBase + ((CrossHairID - 1) * EntLoopDist));

int EnemyHealth = Mem.Read<int>(EnemyInCH + healthOffset);
int EnemyTeam = Mem.Read<int>(EnemyInCH + teamOffset);
if (localTeam != EnemyTeam && EnemyHealth > 0)
{
cout << "in crosshair";

mouse_event(MOUSEEVENTF_LEFTDOWN, NULL, NULL, NULL, NULL);
mouse_event(MOUSEEVENTF_LEFTUP, NULL, NULL, NULL, NULL);

}
}
 

Broihon

edgy 12 y/o
Escobar Tier VIP
Fleep Tier Donator
Dec 22, 2013
1,745
40,528
316
I can't tell if the addresses/offsets are correct but I don't think you can get that part wrong unless you copy/pasted some old source.
Now you have to start to debug your code since it "looks" correct. I highly advise you to watch this video by Rake and then try to find the problem.

Same idea in CSS and CSGO
 
Last edited by a moderator:
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods