From 2e7353ba208bbd966e02326ce3407bde01543f25 Mon Sep 17 00:00:00 2001 From: IMXNOOBX Date: Sun, 22 Oct 2023 14:01:24 +0200 Subject: [PATCH] Updated offsets and offset names to match cs2-dumper --- README.md | 4 +++- memory-external/classes/auto_updater.cpp | 10 +++++----- memory-external/classes/auto_updater.hpp | 14 +++++++------- memory-external/hacks/hack.hpp | 6 +++--- offsets/offsets.json | 4 ++-- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 0c66357..7f94f02 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,9 @@ Simple external esp using gdi overlay to render esp boxes on top of cs2 highligh * To manually update the esp offsets i have included an offsets.json file which will be created once opened. -1. Go to this [unknowncheats thread](https://www.unknowncheats.me/forum/counter-strike-2-a/576077-counter-strike-2-reversal-structs-offsets.html) and find the latest offsets posted by the community +1. Two ways to get the latest offsets. +1.1 Go to this [unknowncheats thread](https://www.unknowncheats.me/forum/counter-strike-2-a/576077-counter-strike-2-reversal-structs-offsets.html) and find the latest offsets posted by the community +1.2 Or go to this repository [cs2-dumper](https://github.com/a2x/cs2-dumper) and find the latest offstes 2. You will find somethig like this diff --git a/memory-external/classes/auto_updater.cpp b/memory-external/classes/auto_updater.cpp index 4b7cab6..19f1d67 100644 --- a/memory-external/classes/auto_updater.cpp +++ b/memory-external/classes/auto_updater.cpp @@ -223,10 +223,10 @@ namespace updater { offsets::m_ArmorValue = data["m_ArmorValue "]; if (data["m_iHealth"].is_number()) offsets::m_iHealth = data["m_iHealth"]; - if (data["dwPlayerPawn"].is_number()) - offsets::dwPlayerPawn = data["dwPlayerPawn"]; + if (data["m_hPlayerPawn"].is_number()) + offsets::m_hPlayerPawn = data["m_hPlayerPawn"]; if (data["dwSanitizedName"].is_number()) - offsets::dwSanitizedName = data["dwSanitizedName"]; + offsets::m_sSanitizedPlayerName = data["m_sSanitizedPlayerName"]; if (data["m_iTeamNum"].is_number()) offsets::m_iTeamNum = data["m_iTeamNum"]; if (data["m_vecOrigin"].is_number()) @@ -259,8 +259,8 @@ namespace updater { data["m_pClippingWeapon"] = offsets::m_pClippingWeapon; data["m_ArmorValue"] = offsets::m_ArmorValue; data["m_iHealth"] = offsets::m_iHealth; - data["dwPlayerPawn"] = offsets::dwPlayerPawn; - data["dwSanitizedName"] = offsets::dwSanitizedName; + data["m_hPlayerPawn"] = offsets::m_hPlayerPawn; + data["m_sSanitizedPlayerName"] = offsets::m_sSanitizedPlayerName; data["m_iTeamNum"] = offsets::m_iTeamNum; data["m_vecOrigin"] = offsets::m_vecOrigin; diff --git a/memory-external/classes/auto_updater.hpp b/memory-external/classes/auto_updater.hpp index 116e48a..afb5c4c 100644 --- a/memory-external/classes/auto_updater.hpp +++ b/memory-external/classes/auto_updater.hpp @@ -30,14 +30,14 @@ namespace updater { const inline std::string github_repo_api = "https://api.github.com/repos/IMXNOOBX/cs2-external-esp/commits"; const inline std::string raw_updated_offets = "https://github.com/IMXNOOBX/cs2-external-esp/raw/main/offsets/offsets.json"; - inline int build_number = 13963; + inline int build_number = 13964; namespace offsets { - inline std::ptrdiff_t dwLocalPlayer = 0x17E27C8; - inline std::ptrdiff_t dwEntityList = 0x1793DC8; - inline std::ptrdiff_t dwViewMatrix = 0x1881D70; + inline std::ptrdiff_t dwLocalPlayer = 0x17E7158; + inline std::ptrdiff_t dwEntityList = 0x1798738; + inline std::ptrdiff_t dwViewMatrix = 0x1886710; inline std::ptrdiff_t dwBuildNumber = 0x487514; - inline std::ptrdiff_t dwPlantedC4 = 0x1887FC0; + inline std::ptrdiff_t dwPlantedC4 = 0x188CAD0; inline std::ptrdiff_t m_flC4Blow = 0xEB0; inline std::ptrdiff_t m_flNextBeep = 0xEAC; @@ -52,8 +52,8 @@ namespace updater { inline std::ptrdiff_t m_pClippingWeapon = 0x1290; inline std::ptrdiff_t m_ArmorValue = 0x14F0; inline std::ptrdiff_t m_iHealth = 0x32C; - inline std::ptrdiff_t dwPlayerPawn = 0x7BC; - inline std::ptrdiff_t dwSanitizedName = 0x720; + inline std::ptrdiff_t m_hPlayerPawn = 0x7BC; + inline std::ptrdiff_t m_sSanitizedPlayerName = 0x720; inline std::ptrdiff_t m_iTeamNum = 0x3BF; inline std::ptrdiff_t m_vecOrigin = 0x1214; } diff --git a/memory-external/hacks/hack.hpp b/memory-external/hacks/hack.hpp index 6b86a38..77f4a76 100644 --- a/memory-external/hacks/hack.hpp +++ b/memory-external/hacks/hack.hpp @@ -19,7 +19,7 @@ namespace hack { const view_matrix_t view_matrix = process->read(base_client.base + updater::offsets::dwViewMatrix); const uintptr_t entity_list = process->read(base_client.base + updater::offsets::dwEntityList); - const std::uint32_t localPlayerPawn = process->read(localPlayer + updater::offsets::dwPlayerPawn); + const std::uint32_t localPlayerPawn = process->read(localPlayer + updater::offsets::m_hPlayerPawn); if (!localPlayerPawn) return; const uintptr_t localList_entry2 = process->read(entity_list + 0x8 * ((localPlayerPawn & 0x7FFF) >> 9) + 16); @@ -97,7 +97,7 @@ namespace hack { continue; - const std::uint32_t playerPawn = process->read(player + updater::offsets::dwPlayerPawn); + const std::uint32_t playerPawn = process->read(player + updater::offsets::m_hPlayerPawn); const uintptr_t list_entry2 = process->read(entity_list + 0x8 * ((playerPawn & 0x7FFF) >> 9) + 16); if (!list_entry2) @@ -116,7 +116,7 @@ namespace hack { continue; std::string playerName = "Invalid Name"; - const DWORD64 playerNameAddress = process->read(player + updater::offsets::dwSanitizedName); + const DWORD64 playerNameAddress = process->read(player + updater::offsets::m_sSanitizedPlayerName); if (playerNameAddress) { char buf[256]; diff --git a/offsets/offsets.json b/offsets/offsets.json index c38350b..537da67 100644 --- a/offsets/offsets.json +++ b/offsets/offsets.json @@ -17,8 +17,8 @@ "m_pClippingWeapon": 4752, "m_ArmorValue": 5360, "m_iHealth": 812, - "dwPlayerPawn": 1980, - "dwSanitizedName": 1824, + "m_hPlayerPawn": 1980, + "m_sSanitizedPlayerName": 1824, "m_iTeamNum": 959, "m_vecOrigin": 4628 } \ No newline at end of file