From 1bfbeaef915998d7beb707cc34473273e72edd28 Mon Sep 17 00:00:00 2001 From: ifBars <114284668+ifBars@users.noreply.github.com> Date: Tue, 24 Oct 2023 00:06:29 -0600 Subject: [PATCH 1/4] isFlashed flag - Added Player is flashed flag to show when a player is flashed --- memory-external/classes/auto_updater.cpp | 3 +++ memory-external/classes/auto_updater.hpp | 1 + memory-external/hacks/hack.hpp | 18 ++++++++++++++++-- offsets/offsets.json | 1 + 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/memory-external/classes/auto_updater.cpp b/memory-external/classes/auto_updater.cpp index 19f1d67..d2baa7a 100644 --- a/memory-external/classes/auto_updater.cpp +++ b/memory-external/classes/auto_updater.cpp @@ -213,6 +213,8 @@ namespace updater { offsets::m_vecAbsOrigin = data["m_vecAbsOrigin"]; if (data["m_pGameSceneNode"].is_number()) offsets::m_pGameSceneNode = data["m_pGameSceneNode"]; + if (data["m_flFlashDuration"].is_number()) + offsets::m_flFlashDuration = data["m_flFlashDuration"]; if (data["m_bIsDefusing"].is_number()) offsets::m_bIsDefusing = data["m_bIsDefusing"]; if (data["m_szName"].is_number()) @@ -254,6 +256,7 @@ namespace updater { data["m_iAccount"] = offsets::m_iAccount; data["m_vecAbsOrigin"] = offsets::m_vecAbsOrigin; data["m_pGameSceneNode"] = offsets::m_pGameSceneNode; + data["m_flFlashDuration"] = offsets::m_flFlashDuration; data["m_bIsDefusing"] = offsets::m_bIsDefusing; data["m_szName"] = offsets::m_szName; data["m_pClippingWeapon"] = offsets::m_pClippingWeapon; diff --git a/memory-external/classes/auto_updater.hpp b/memory-external/classes/auto_updater.hpp index afb5c4c..51af8f2 100644 --- a/memory-external/classes/auto_updater.hpp +++ b/memory-external/classes/auto_updater.hpp @@ -47,6 +47,7 @@ namespace updater { inline std::ptrdiff_t m_iAccount = 0x40; inline std::ptrdiff_t m_vecAbsOrigin = 0xC8; inline std::ptrdiff_t m_pGameSceneNode = 0x310; + inline std::ptrdiff_t m_flFlashDuration = 0x1450; inline std::ptrdiff_t m_bIsDefusing = 0x1390; inline std::ptrdiff_t m_szName = 0xC18; inline std::ptrdiff_t m_pClippingWeapon = 0x1290; diff --git a/memory-external/hacks/hack.hpp b/memory-external/hacks/hack.hpp index 6f8f166..7a41cc4 100644 --- a/memory-external/hacks/hack.hpp +++ b/memory-external/hacks/hack.hpp @@ -74,8 +74,6 @@ namespace hack { * (This could have been done by getting a entity list count from the engine, but I'm too lazy to do that) **/ while (true) { - - playerIndex++; list_entry = process->read(entity_list + (8 * (playerIndex & 0x7FFF) >> 9) + 16); if (!list_entry) @@ -268,6 +266,22 @@ namespace hack { 10 ); + float flashDuration = process->read(pCSPlayerPawn + updater::offsets::m_flFlashDuration); + bool isFlashed; + if (flashDuration > 0.0) + isFlashed = true; + if (isFlashed) + { + render::RenderText( + g::hdcBuffer, + screenHead.x + (width / 2 + 5), + screenHead.y + 60, + "Player is flashed", + config::esp_distance_color, + 10 + ); + } + std::string defuText = "Player is defusing"; if (isDefusing) diff --git a/offsets/offsets.json b/offsets/offsets.json index 537da67..0e2f93c 100644 --- a/offsets/offsets.json +++ b/offsets/offsets.json @@ -12,6 +12,7 @@ "m_iAccount": 64, "m_vecAbsOrigin": 200, "m_pGameSceneNode": 784, + "m_flFlashDuration": 5200, "m_bIsDefusing": 5008, "m_szName": 3096, "m_pClippingWeapon": 4752, From 5f2c6739875f0e4d0dc41e696672a72740984685 Mon Sep 17 00:00:00 2001 From: ifBars <114284668+ifBars@users.noreply.github.com> Date: Tue, 24 Oct 2023 00:14:23 -0600 Subject: [PATCH 2/4] Fix isFlashed - Fix the way isFlashed works --- memory-external/hacks/hack.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/memory-external/hacks/hack.hpp b/memory-external/hacks/hack.hpp index 7a41cc4..686a8aa 100644 --- a/memory-external/hacks/hack.hpp +++ b/memory-external/hacks/hack.hpp @@ -267,11 +267,9 @@ namespace hack { ); float flashDuration = process->read(pCSPlayerPawn + updater::offsets::m_flFlashDuration); - bool isFlashed; - if (flashDuration > 0.0) - isFlashed = true; - if (isFlashed) + if (flashDuration > 0.1) { + std::cout << std::to_string(flashDuration) << std::endl; render::RenderText( g::hdcBuffer, screenHead.x + (width / 2 + 5), From 8378e39a0d57498806431f0be40dc9a831e61b8f Mon Sep 17 00:00:00 2001 From: ifBars <114284668+ifBars@users.noreply.github.com> Date: Tue, 24 Oct 2023 00:18:47 -0600 Subject: [PATCH 3/4] Update hack.hpp --- memory-external/hacks/hack.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/memory-external/hacks/hack.hpp b/memory-external/hacks/hack.hpp index 686a8aa..0e231bd 100644 --- a/memory-external/hacks/hack.hpp +++ b/memory-external/hacks/hack.hpp @@ -269,7 +269,6 @@ namespace hack { float flashDuration = process->read(pCSPlayerPawn + updater::offsets::m_flFlashDuration); if (flashDuration > 0.1) { - std::cout << std::to_string(flashDuration) << std::endl; render::RenderText( g::hdcBuffer, screenHead.x + (width / 2 + 5), From f62b0e80873c12e4fc54219a0db822059c565371 Mon Sep 17 00:00:00 2001 From: ifBars <114284668+ifBars@users.noreply.github.com> Date: Wed, 25 Oct 2023 22:50:46 -0600 Subject: [PATCH 4/4] Update offsets.json - Update offsets for build 10/25 13:54:75 --- offsets/offsets.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/offsets/offsets.json b/offsets/offsets.json index 0e2f93c..76e442d 100644 --- a/offsets/offsets.json +++ b/offsets/offsets.json @@ -1,10 +1,10 @@ { - "build_number": 13964, - "dwLocalPlayer": 25063768, - "dwEntityList": 24741688, - "dwViewMatrix": 25716496, + "build_number": 13965, + "dwLocalPlayer": 25067864, + "dwEntityList": 24745408, + "dwViewMatrix": 25720624, "dwBuildNumber": 4748564, - "dwPlantedC4": 25742032, + "dwPlantedC4": 25739232, "m_flC4Blow": 3760, "m_flNextBeep": 3756, "m_flTimerLength": 3768, @@ -12,7 +12,7 @@ "m_iAccount": 64, "m_vecAbsOrigin": 200, "m_pGameSceneNode": 784, - "m_flFlashDuration": 5200, + "m_flFlashDuration": 5200, "m_bIsDefusing": 5008, "m_szName": 3096, "m_pClippingWeapon": 4752, @@ -22,4 +22,4 @@ "m_sSanitizedPlayerName": 1824, "m_iTeamNum": 959, "m_vecOrigin": 4628 -} \ No newline at end of file +}