Skip to content

Commit b24603e

Browse files
committed
fixed offsets and imgui theme
1 parent fafacad commit b24603e

File tree

10 files changed

+310
-145
lines changed

10 files changed

+310
-145
lines changed

CHANGELOG.txt

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
## Changes📣
22

3-
最新更新于2024年4月29日 21:56,现有功能如下:
3+
最近更新于2024年05月01日 10:50
4+
5+
- fixed 5月1日cs2官方游戏更新后的offsets
6+
- 优化ImGui的主题UI、添加时间水印
7+
8+
## Features
49

510
- 方框透视
611
- 骨骼透视
@@ -16,11 +21,12 @@
1621

1722
## Usage👌
1823

19-
1. 打开`CS2`游戏,并进入游戏房间
20-
2. 进入游戏房间后,此时鼠标双击`CS2CheatCpp.exe`运行外挂程序
21-
3. 运行外挂程序后,会显示外挂程序菜单,可以按`Insert键`进行显示/隐藏
22-
4. 若没有显示外挂程序菜单,则请提交日志文件记录 - 多数可能为offsets与CS2官方更新不同步,可clone代码后自行构建
23-
5. 每局结束后,建议先退出外挂程序,等到再次进入游戏房间后重复上述步骤 - 因为`句柄劫持`有时候效果不是非常好,至少我没有被封过
24+
1. 确保您的windows电脑上安装了`Directx` - 因为cs2游戏使用的是[directx 11](https://www.pcgamingwiki.com/wiki/Counter-Strike_2)
25+
2. 打开`CS2`游戏,并进入游戏房间
26+
3. 进入游戏房间后,此时鼠标双击`CS2CheatCpp.exe`运行外挂程序
27+
4. 运行外挂程序后,会显示外挂程序菜单,可以按`Insert键`进行显示/隐藏
28+
5. 若没有显示外挂程序菜单,则请提交日志文件记录 - 多数可能为offsets与CS2官方更新不同步,可clone代码后自行构建
29+
6. 【可选操作】每局结束后,建议先退出外挂程序,等到再次进入游戏房间后重复上述步骤 - 因为`句柄劫持`有时候效果不是非常好,至少我目前没有被封过
2430

2531
> 该演戏就演戏,被封号后果自负,后续会更新内部外挂实现ESP外挂不能实现的功能
2632

CS2CheatCpp/CS2_Cheat_Log.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[Tip]: After running this program, please make sure to read the software usage instructions. If it doesn't work, please copy this log file record to the GitHub repository and submit an issue, or directly contact the author via WeChat at yl1099129793. The author has limited capacity and cannot synchronously update CS2 game patch. If urgently needed, you can fork this repository and modify offsets to build with the latest value.
22

3-
[2024/04/29 22:36:00] cs2.exe's process id located at11308
4-
[2024/04/29 22:36:00] client.dll -> 0x7fffb69a0000
3+
[2024/05/01 10:59:41] cs2.exe's process id located at7172
4+
[2024/05/01 10:59:41] client.dll -> 0x7ffc93b70000

CS2CheatCpp/SDK/buttons.hpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Generated using https://github.com/a2x/cs2-dumper
2-
// 2024-04-27 00:03:34.843899 UTC
2+
// 2024-05-01 00:25:27.858971200 UTC
33

44
#pragma once
55

@@ -8,21 +8,21 @@
88
namespace cs2_dumper {
99
// Module: client.dll
1010
namespace buttons {
11-
constexpr std::ptrdiff_t attack = 0x1733230;
12-
constexpr std::ptrdiff_t attack2 = 0x17332C0;
13-
constexpr std::ptrdiff_t back = 0x1733500;
14-
constexpr std::ptrdiff_t duck = 0x17337D0;
15-
constexpr std::ptrdiff_t forward = 0x1733470;
16-
constexpr std::ptrdiff_t jump = 0x1733740;
17-
constexpr std::ptrdiff_t left = 0x1733590;
18-
constexpr std::ptrdiff_t lookatweapon = 0x192EE70;
19-
constexpr std::ptrdiff_t reload = 0x17331A0;
20-
constexpr std::ptrdiff_t right = 0x1733620;
21-
constexpr std::ptrdiff_t showscores = 0x192ED50;
22-
constexpr std::ptrdiff_t sprint = 0x1733110;
23-
constexpr std::ptrdiff_t turnleft = 0x1733350;
24-
constexpr std::ptrdiff_t turnright = 0x17333E0;
25-
constexpr std::ptrdiff_t use = 0x17336B0;
26-
constexpr std::ptrdiff_t zoom = 0x192EDE0;
11+
constexpr std::ptrdiff_t attack = 0x1736410;
12+
constexpr std::ptrdiff_t attack2 = 0x17364A0;
13+
constexpr std::ptrdiff_t back = 0x17366E0;
14+
constexpr std::ptrdiff_t duck = 0x17369B0;
15+
constexpr std::ptrdiff_t forward = 0x1736650;
16+
constexpr std::ptrdiff_t jump = 0x1736920;
17+
constexpr std::ptrdiff_t left = 0x1736770;
18+
constexpr std::ptrdiff_t lookatweapon = 0x19329E0;
19+
constexpr std::ptrdiff_t reload = 0x1736380;
20+
constexpr std::ptrdiff_t right = 0x1736800;
21+
constexpr std::ptrdiff_t showscores = 0x19328C0;
22+
constexpr std::ptrdiff_t sprint = 0x17362F0;
23+
constexpr std::ptrdiff_t turnleft = 0x1736530;
24+
constexpr std::ptrdiff_t turnright = 0x17365C0;
25+
constexpr std::ptrdiff_t use = 0x1736890;
26+
constexpr std::ptrdiff_t zoom = 0x1932950;
2727
}
2828
}

CS2CheatCpp/SDK/client.dll.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Generated using https://github.com/a2x/cs2-dumper
2-
// 2024-04-27 00:03:34.843899 UTC
2+
// 2024-05-01 00:25:27.858971200 UTC
33

44
#pragma once
55

CS2CheatCpp/SDK/offsets.hpp

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Generated using https://github.com/a2x/cs2-dumper
2-
// 2024-04-27 00:03:34.843899 UTC
2+
// 2024-05-01 00:25:27.858971200 UTC
33

44
#pragma once
55

@@ -9,43 +9,43 @@ namespace cs2_dumper {
99
namespace offsets {
1010
// Module: client.dll
1111
namespace client_dll {
12-
constexpr std::ptrdiff_t dwCSGOInput = 0x192EF50;
13-
constexpr std::ptrdiff_t dwEntityList = 0x18C6268;
14-
constexpr std::ptrdiff_t dwGameEntitySystem = 0x19E3B60;
12+
constexpr std::ptrdiff_t dwCSGOInput = 0x1932AC0;
13+
constexpr std::ptrdiff_t dwEntityList = 0x18C9E78;
14+
constexpr std::ptrdiff_t dwGameEntitySystem = 0x19E7560;
1515
constexpr std::ptrdiff_t dwGameEntitySystem_getHighestEntityIndex = 0x1510;
16-
constexpr std::ptrdiff_t dwGameRules = 0x1923360;
17-
constexpr std::ptrdiff_t dwGlobalVars = 0x172DD50;
18-
constexpr std::ptrdiff_t dwGlowManager = 0x1923778;
19-
constexpr std::ptrdiff_t dwLocalPlayerController = 0x1915C08;
20-
constexpr std::ptrdiff_t dwLocalPlayerPawn = 0x173A3B8;
21-
constexpr std::ptrdiff_t dwPlantedC4 = 0x192C3F8;
22-
constexpr std::ptrdiff_t dwPrediction = 0x173A280;
23-
constexpr std::ptrdiff_t dwSensitivity = 0x19240A8;
16+
constexpr std::ptrdiff_t dwGameRules = 0x1926D80;
17+
constexpr std::ptrdiff_t dwGlobalVars = 0x1730F20;
18+
constexpr std::ptrdiff_t dwGlowManager = 0x19271A0;
19+
constexpr std::ptrdiff_t dwLocalPlayerController = 0x1919588;
20+
constexpr std::ptrdiff_t dwLocalPlayerPawn = 0x173D5A8;
21+
constexpr std::ptrdiff_t dwPlantedC4 = 0x192FF68;
22+
constexpr std::ptrdiff_t dwPrediction = 0x173D470;
23+
constexpr std::ptrdiff_t dwSensitivity = 0x1927AC8;
2424
constexpr std::ptrdiff_t dwSensitivity_sensitivity = 0x40;
25-
constexpr std::ptrdiff_t dwViewAngles = 0x19342E0;
26-
constexpr std::ptrdiff_t dwViewMatrix = 0x19278A0;
27-
constexpr std::ptrdiff_t dwViewRender = 0x19280A0;
28-
constexpr std::ptrdiff_t dwWeaponC4 = 0x18C9830;
25+
constexpr std::ptrdiff_t dwViewAngles = 0x1937E50;
26+
constexpr std::ptrdiff_t dwViewMatrix = 0x192B2C0;
27+
constexpr std::ptrdiff_t dwViewRender = 0x192BAC0;
28+
constexpr std::ptrdiff_t dwWeaponC4 = 0x18CD2D0;
2929
}
3030
// Module: engine2.dll
3131
namespace engine2_dll {
32-
constexpr std::ptrdiff_t dwBuildNumber = 0x516574;
33-
constexpr std::ptrdiff_t dwNetworkGameClient = 0x515AC8;
32+
constexpr std::ptrdiff_t dwBuildNumber = 0x518744;
33+
constexpr std::ptrdiff_t dwNetworkGameClient = 0x517AF8;
3434
constexpr std::ptrdiff_t dwNetworkGameClient_deltaTick = 0x258;
3535
constexpr std::ptrdiff_t dwNetworkGameClient_getLocalPlayer = 0xF0;
3636
constexpr std::ptrdiff_t dwNetworkGameClient_getMaxClients = 0x250;
3737
constexpr std::ptrdiff_t dwNetworkGameClient_signOnState = 0x240;
38-
constexpr std::ptrdiff_t dwWindowHeight = 0x5CEE4C;
39-
constexpr std::ptrdiff_t dwWindowWidth = 0x5CEE48;
38+
constexpr std::ptrdiff_t dwWindowHeight = 0x5D1084;
39+
constexpr std::ptrdiff_t dwWindowWidth = 0x5D1080;
4040
}
4141
// Module: inputsystem.dll
4242
namespace inputsystem_dll {
43-
constexpr std::ptrdiff_t dwInputSystem = 0x367A0;
43+
constexpr std::ptrdiff_t dwInputSystem = 0x377C0;
4444
}
4545
// Module: matchmaking.dll
4646
namespace matchmaking_dll {
47-
constexpr std::ptrdiff_t dwGameTypes = 0x1D21E0;
48-
constexpr std::ptrdiff_t dwGameTypes_mapName = 0x1D2300;
47+
constexpr std::ptrdiff_t dwGameTypes = 0x1D2290;
48+
constexpr std::ptrdiff_t dwGameTypes_mapName = 0x1D23B0;
4949
}
5050
}
5151
}

CS2CheatCpp/imgui.ini

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[Window][Debug##Default]
22
Pos=60,60
3-
Size=400,400
3+
Size=296,50
44

55
[Window][CS2 ESP Cheat]
6-
Pos=619,218
7-
Size=670,488
6+
Pos=547,160
7+
Size=712,545
88

99
[Window][CS2]
1010
Pos=60,61
@@ -15,3 +15,7 @@ Collapsed=1
1515
Pos=267,100
1616
Size=550,676
1717

18+
[Window][watermark]
19+
Pos=10,10
20+
Size=211,32
21+

CS2CheatCpp/src/gui.cpp

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#define _CRT_SECURE_NO_WARNINGS
2+
13
#include <corecrt_math.h>
24
#include "gui.h"
35
#include "../dependencies/ImGui/imgui.h"
@@ -177,6 +179,47 @@ void gui::CreateImGui() noexcept
177179

178180
ImGui_ImplWin32_Init(overlay);
179181
ImGui_ImplDX11_Init(device, device_context);
182+
183+
ImGuiStyle& style = ImGui::GetStyle();
184+
style.Alpha = 1.0;
185+
style.WindowRounding = 3;
186+
style.GrabRounding = 1;
187+
style.GrabMinSize = 20;
188+
style.FrameRounding = 3;
189+
190+
style.Colors[ImGuiCol_Text] = ImVec4(0.00f, 1.00f, 1.00f, 1.00f);
191+
style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.00f, 0.40f, 0.41f, 1.00f);
192+
style.Colors[ImGuiCol_WindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 1.00f);
193+
style.Colors[ImGuiCol_Border] = ImVec4(0.00f, 1.00f, 1.00f, 0.65f);
194+
style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
195+
style.Colors[ImGuiCol_FrameBg] = ImVec4(0.44f, 0.80f, 0.80f, 0.18f);
196+
style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.44f, 0.80f, 0.80f, 0.27f);
197+
style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.44f, 0.81f, 0.86f, 0.66f);
198+
style.Colors[ImGuiCol_TitleBg] = ImVec4(0.14f, 0.18f, 0.21f, 0.73f);
199+
style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.00f, 0.00f, 0.00f, 0.54f);
200+
style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.00f, 1.00f, 1.00f, 0.27f);
201+
style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.20f);
202+
style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.22f, 0.29f, 0.30f, 0.71f);
203+
style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.00f, 1.00f, 1.00f, 0.44f);
204+
style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.00f, 1.00f, 1.00f, 0.74f);
205+
style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.00f, 1.00f, 1.00f, 1.00f);
206+
style.Colors[ImGuiCol_CheckMark] = ImVec4(0.00f, 1.00f, 1.00f, 0.68f);
207+
style.Colors[ImGuiCol_SliderGrab] = ImVec4(0.00f, 1.00f, 1.00f, 0.36f);
208+
style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.00f, 1.00f, 1.00f, 0.76f);
209+
style.Colors[ImGuiCol_Button] = ImVec4(0.00f, 0.65f, 0.65f, 0.46f);
210+
style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.01f, 1.00f, 1.00f, 0.43f);
211+
style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.00f, 1.00f, 1.00f, 0.62f);
212+
style.Colors[ImGuiCol_Header] = ImVec4(0.00f, 1.00f, 1.00f, 0.33f);
213+
style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.00f, 1.00f, 1.00f, 0.42f);
214+
style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.00f, 1.00f, 1.00f, 0.54f);
215+
style.Colors[ImGuiCol_ResizeGrip] = ImVec4(0.00f, 1.00f, 1.00f, 0.54f);
216+
style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.00f, 1.00f, 1.00f, 0.74f);
217+
style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.00f, 1.00f, 1.00f, 1.00f);
218+
style.Colors[ImGuiCol_PlotLines] = ImVec4(0.00f, 1.00f, 1.00f, 1.00f);
219+
style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.00f, 1.00f, 1.00f, 1.00f);
220+
style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.00f, 1.00f, 1.00f, 1.00f);
221+
style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(0.00f, 1.00f, 1.00f, 1.00f);
222+
style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.00f, 1.00f, 1.00f, 0.22f);
180223
}
181224

182225
void gui::DestroyImGui() noexcept
@@ -224,6 +267,16 @@ void gui::EndRender() noexcept
224267

225268
void gui::Render() noexcept
226269
{
270+
// 水印
271+
auto start = std::chrono::system_clock::now();
272+
auto end = std::chrono::system_clock::now();
273+
auto elasped_seconds = end - start;
274+
auto end_time = std::chrono::system_clock::to_time_t(end);
275+
ImGui::SetNextWindowPos({ 10, 10 });
276+
ImGui::SetWindowSize(ImVec2(296, 50));
277+
ImGui::Begin("watermark", 0, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoTitleBar);
278+
ImGui::Text("yinlei | %s", std::ctime(&end_time));
279+
ImGui::End();
227280
if (menuToggle) {
228281
// 更新当前玩家最大速度
229282
if (speed > maxSpeed) {
@@ -233,7 +286,8 @@ void gui::Render() noexcept
233286
ImGui::ShowDemoWindow(&show_demo_window);*/
234287
ImGuiWindowFlags window_flags = 0;
235288
window_flags |= ImGuiWindowFlags_MenuBar;
236-
ImGui::SetNextWindowSize({ 600.f,500.f }, ImGuiCond_FirstUseEver);
289+
window_flags |= ImGuiWindowFlags_NoCollapse;
290+
ImGui::SetNextWindowSize(ImVec2(900, 450), ImGuiCond_FirstUseEver);
237291
ImGui::Begin("CS2 ESP Cheat", 0, window_flags);
238292
if (ImGui::BeginMenuBar())
239293
{
@@ -312,7 +366,7 @@ void gui::Render() noexcept
312366
ImGui::Text("Maximum movement speed: %d", maxSpeed);
313367
ImGui::EndTabItem();
314368
}
315-
if (ImGui::BeginTabItem("About"))
369+
if (ImGui::BeginTabItem("Misc"))
316370
{
317371
ImGui::SeparatorText("Github Homepage");
318372
ImGui::TextWrapped("https://github.com/yinleiCoder/cs2-cheat-cpp");

CS2CheatCpp/src/gui.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <dwmapi.h>
44
#include <windowsx.h>
55
#include <Windows.h>
6+
#include <chrono>
67

78
namespace gui
89
{

0 commit comments

Comments
 (0)