Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ProcMem.h"
- ProcMem Mem;
- // Needs to be updated when counter strike is updated.
- const DWORD playerBase = 0xA68A14;
- const DWORD entityBase = 0x4A0B0C4;
- const DWORD crosshairOffset = 0x23F8;
- // Does not change on updated, in other words, no need to update these!
- const DWORD teamOffset = 0xF0;
- const DWORD healthOffset = 0xFC;
- const DWORD EntLoopDist = 0x10;
- DWORD ClientDll;
- DWORD localPlayer;
- int CrossHairID;
- int localTeam;
- void FuckThemAll();
- int main()
- {
- Mem.GetProcess("csgo.exe");
- 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)
- {
- FuckThemAll();
- Sleep(250);
- }
- return 0;
- }
- void FuckThemAll()
- {
- DWORD EnemyInCH = Mem.Read<DWORD>(ClientDll + entityBase + ((CrossHairID - 1) * EntLoopDist)); // CH = Crosshair.
- int EnemyHealth = Mem.Read<int>(EnemyInCH + healthOffset); // Enemy in crosshair's
- int EnemyTeam = Mem.Read<int>(EnemyInCH + teamOffset); // Enemy in crosshair's team, we need this to compare it to our own player's team)
- if (localTeam != EnemyTeam && EnemyHealth > 0)
- {
- printf("triggered");
- mouse_event(MOUSEEVENTF_LEFTDOWN, NULL, NULL, NULL, NULL);
- mouse_event(MOUSEEVENTF_LEFTUP, NULL, NULL, NULL, NULL);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment