moj maz potwor
++
#pragma once
#define _USE_MATH_DEFINES
#include <math.h>
#include "Game.h"
#include "Entity.h"
#include <iostream>


namespace AimControl
{
inline int HotKey = VK_LBUTTON;
inline float AimFov = 5;
inline float Smooth = 0.7;
inline Vec2 RCSScale = { 1.f,1.f };
inline int RCSBullet = 1;
inline std::vector<int> HotKeyList{VK_LBUTTON, VK_LMENU, VK_RBUTTON, VK_XBUTTON1, VK_XBUTTON2, VK_CAPITAL, VK_LSHIFT, VK_LCONTROL};// added new button VK_LBUTTON

inline void SetHotKey(int Index)
{
HotKey = HotKeyList.at(Index);
}

inline void AimBot(const CEntity& Local, Vec3 LocalPos, Vec3 AimPos)
{
float Yaw, Pitch;
float Distance, Norm;
Vec3 OppPos;

OppPos = AimPos - LocalPos;

Distance = sqrt(pow(OppPos.x, 2) + pow(OppPos.y, 2));

Yaw = atan2f(OppPos.y, OppPos.x) * 57.295779513 - Local.Pawn.ViewAngle.y;
Pitch = -atan(OppPos.z / Distance) * 57.295779513 - Local.Pawn.ViewAngle.x;
Norm = sqrt(pow(Yaw, 2) + pow(Pitch, 2));
if (Norm > AimFov)
return;

Yaw = Yaw * (1 - Smooth) + Local.Pawn.ViewAngle.y;
Pitch = Pitch * (1 - Smooth) + Local.Pawn.ViewAngle.x;

// Recoil control
if (Local.Pawn.ShotsFired > RCSBullet)
{
Vec2 PunchAngle;
if (Local.Pawn.AimPunchCache.Count <= 0 && Local.Pawn.AimPunchCache.Count > 0xFFFF)
return;
if (!ProcessMgr.ReadMemory<Vec2>(Local.Pawn.AimPunchCache.Data + (Local.Pawn.AimPunchCache.Count - 1) * sizeof(Vec3), PunchAngle))
return;

Yaw = Yaw - PunchAngle.y * RCSScale.x;
Pitch = Pitch - PunchAngle.x * RCSScale.y;
}

gGame.SetViewAngle(Yaw, Pitch);
}
}



=============================================================================


#pragma once
#include "Game.h"
#include "View.hpp"
#include "Bone.h"
#include "Globals.hpp"

struct C_UTL_VECTOR
{
DWORD64 Count = 0;
DWORD64 Data = 0;
};

class PlayerController
{
public:
DWORD64 Address = 0;
int TeamID = 0;
int Health = 0;
int AliveStatus = 0;
DWORD Pawn = 0;
std::string PlayerName;
public:
bool GetTeamID();
bool GetHealth();
bool GetIsAlive();
bool GetPlayerName();
DWORD64 GetPlayerPawnAddress();
};

class PlayerPawn
{
public:
enum class Flags
{
NONE,
IN_AIR = 1 << 0
};

DWORD64 Address = 0;
CBone BoneData;
Vec2 ViewAngle;
Vec3 Pos;
Vec2 ScreenPos;
Vec3 CameraPos;
std::string WeaponName;
DWORD ShotsFired;
Vec2 AimPunchAngle;
C_UTL_VECTOR AimPunchCache;
int Health;
int TeamID;
int Fov;
DWORD64 bSpottedByMask;
int fFlags;
public:
bool GetPos();
bool GetViewAngle();
bool GetCameraPos();
bool GetWeaponName();
bool GetShotsFired();
bool GetAimPunchAngle();
bool GetHealth();
bool GetTeamID();
bool GetFov();
bool GetSpotted();
bool GetFFlags();
bool GetAimPunchCache();

constexpr bool HasFlag(const Flags Flag) const noexcept {
return fFlags & (int)Flag;
}
};

class CEntity
{
public:
PlayerController Controller;
PlayerPawn Pawn;
public:
// 更新数据
bool UpdateController(const DWORD64& PlayerControllerAddress);
bool UpdatePawn(const DWORD64& PlayerPawnAddress);
// 是否存活
bool IsAlive();
// 是否在屏幕内
bool IsInScreen();
// 获取骨骼数据
CBone GetBone() const;
};



=============================================================================

#include "TriggerBot.h"

void TriggerBot::Run(const CEntity& LocalEntity)
{
DWORD uHandle = 0;
if (!ProcessMgr.ReadMemory<DWORD>(LocalEntity.Pawn.Address + Offset::Pawn.iIDEntIndex, uHandle))
return;
if (uHandle == -1)
return;

DWORD64 ListEntry = 0;
ListEntry = ProcessMgr.TraceAddress(gGame.GetEntityListAddress(), { 0x8 * (uHandle >> 9) + 0x10,0x0 });
if (ListEntry == 0)
return;

DWORD64 PawnAddress = 0;
if (!ProcessMgr.ReadMemory<DWORD64>(ListEntry + 0x78 * (uHandle & 0x1FF), PawnAddress))
return;

CEntity Entity;
if (!Entity.UpdatePawn(PawnAddress))
return;

bool AllowShoot = false;

if (MenuConfig::TeamCheck)
AllowShoot = LocalEntity.Pawn.TeamID != Entity.Pawn.TeamID && Entity.Pawn.Health > 0;
else
AllowShoot = Entity.Pawn.Health > 0;

if (!AllowShoot)
return;

static std::chrono::time_point LastTimePoint = std::chrono::steady_clock::now();
auto CurTimePoint = std::chrono::steady_clock::now();
if (CurTimePoint - LastTimePoint >= std::chrono::milliseconds(TriggerDelay))
{
const bool isAlreadyShooting = GetAsyncKeyState(VK_LBUTTON) < 0;
if (!isAlreadyShooting)
{
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
}

LastTimePoint = CurTimePoint;
}
}

#pragma once
#include "Game.h"
#include "Entity.h"
#include "MenuConfig.hpp"
#include <chrono>

namespace TriggerBot
{
inline DWORD TriggerDelay = 90; // ms
inline int HotKey = VK_LMENU;
inline std::vector<int> HotKeyList{VK_LMENU, VK_RBUTTON, VK_XBUTTON1, VK_XBUTTON2, VK_CAPITAL, VK_LSHIFT, VK_LCONTROL};
inline int Mode = 0;

inline void SetHotKey(int Index)
{
HotKey = HotKeyList.at(Index);
}
inline void SetMode(int Index)
{
Mode = Index;
}

// Triggerbot
void Run(const CEntity& LocalEntity);
}


=============================================================================


#include "Offsets.h"
#include "Cheats.h"
#include "Utils/Format.hpp"
#include <iostream>
#include <iomanip>
#include <filesystem>
#include <cstdlib>
#include <KnownFolders.h>
#include <ShlObj.h>

namespace fs = std::filesystem;

int main()
{
auto ProcessStatus = ProcessMgr.Attach("cs2.exe");
char documentsPath[MAX_PATH];
if (SHGetFolderPathA(NULL, CSIDL_PERSONAL, NULL, 0, documentsPath) != S_OK) {
std::cerr << "Failed to get the Documents folder path." << std::endl;
goto END;
}
MenuConfig::path = documentsPath;
MenuConfig::path += "/CS2_External";

if (ProcessStatus != StatusCode::SUCCEED)
{
std::cout << "[ERROR] Failed to attach process, StatusCode:" << ProcessStatus << std::endl;
goto END;
}

if (!Offset::UpdateOffsets())
{
std::cout << "[ERROR] Failed to update offsets." << std::endl;
goto END;
}

if (!gGame.InitAddress())
{
std::cout << "[ERROR] Failed to call InitAddress()."<< std::endl;
goto END;
}

std::cout << Format("[Game] Pid:%d\n", ProcessMgr.ProcessID);
std::cout << Format("[Game] Client:%llX\n", gGame.GetClientDLLAddress());

std::cout << "Offset:" << std::endl;
std::cout << Format("--EntityList:%llX\n", Offset::EntityList);
std::cout << Format("--Matrix:%llX\n", Offset::Matrix);
std::cout << Format("--LocalPlayerController:%llX\n", Offset::LocalPlayerController);
std::cout << Format("--ViewAngles:%llX\n", Offset::ViewAngle);
std::cout << Format("--LocalPlayerPawn:%llX\n", Offset::LocalPlayerPawn);
std::cout << Format("--ForceJump:%llX\n", Offset::ForceJump);


if (fs::exists(MenuConfig::path))
std::cout << "Config folder connected: "<< MenuConfig::path << std::endl;
else
{
if (fs::create_directory(MenuConfig::path))
std::cout << "Config folder created: " << MenuConfig::path << std::endl;
else
{
std::cerr << "Failed to create the config directory." << std::endl;
goto END;
}
}

std::cout << "Runing..." << std::endl;

try
{
Gui.AttachAnotherWindow("Counter-Strike 2", "SDL_app", Cheats::Run);
}
catch (OSImGui::OSException& e)
{
std::cout << e.what() << std::endl;
}

END:
system("pause");
return 0;
}


=============================================================================




Komentarze
hex 29 marca o 3:35 
♥♥♥♥
filip 14 marca o 15:28 
-rep he molests children
Vulmar 28 lutego o 0:18 
-rep zgwałcił swoje matkę
relapse 19 lutego o 8:21 
-rep he raped me
MykolasAph 20 czerwca 2023 o 11:59 
-REP SMURF