├── README.md
├── cs2 external.sln
├── cs2-external-evo.vcxproj
├── cs2-external-evo.vcxproj.filters
├── cs2-external-evo.vcxproj.user
└── fhook
├── core
├── core.cpp
└── ctx
│ ├── ctx.cpp
│ └── ctx.hpp
├── framework
├── config
│ ├── cfg.cpp
│ └── cfg.hpp
├── framework.cpp
└── framework.hpp
├── hacks
├── ctx
│ ├── hacks_ctx.cpp
│ └── hacks_ctx.hpp
└── features
│ ├── esp
│ ├── esp.cpp
│ └── esp.hpp
│ ├── flash_builder
│ ├── flash_builder.cpp
│ └── flash_builder.hpp
│ ├── grenade
│ ├── grenades.cpp
│ └── grenades.hpp
│ ├── legitbot
│ ├── legitbot.cpp
│ └── legitbot.hpp
│ ├── ragebot
│ ├── ragebot.cpp
│ └── ragebot.hpp
│ ├── shots
│ ├── shots.cpp
│ ├── shots.hpp
│ └── shots_hitsound.hpp
│ ├── sound_system
│ ├── sound.cpp
│ └── sound.hpp
│ └── triggerbot
│ ├── triggerbot.cpp
│ └── triggerbot.hpp
├── inc.hpp
├── sdk
├── animation_system
│ ├── animation_system.cpp
│ └── animation_system.hpp
├── classes
│ ├── bone_system.hpp
│ ├── entity.hpp
│ └── view.hpp
├── input_system
│ ├── input_system.cpp
│ └── input_system.hpp
├── math
│ ├── color_t.hpp
│ ├── rect_t.hpp
│ └── str_t.hpp
├── memory
│ └── mem.hpp
├── offsets
│ └── offsets.hpp
├── process_manager
│ ├── process_manager.cpp
│ └── process_manager.hpp
├── render
│ ├── render.cpp
│ ├── render.hpp
│ ├── render_fonts.hpp
│ └── render_sdk.hpp
└── reverse
│ ├── reversed_funcs.cpp
│ └── reversed_funcs.hpp
└── thirdparty
├── bytes.hpp
├── custom.cpp
├── custom.hpp
├── freetype
└── include&lib.zip
├── imconfig.h
├── imgui.cpp
├── imgui.h
├── imgui_demo.cpp
├── imgui_draw.cpp
├── imgui_freetype.cpp
├── imgui_freetype.h
├── imgui_impl_dx11.cpp
├── imgui_impl_dx11.h
├── imgui_impl_dx9.cpp
├── imgui_impl_dx9.h
├── imgui_impl_win32.cpp
├── imgui_impl_win32.h
├── imgui_internal.h
├── imgui_tables.cpp
├── imgui_widgets.cpp
├── imstb_rectpack.h
├── imstb_textedit.h
└── imstb_truetype.h
/README.md:
--------------------------------------------------------------------------------
1 | # CS2-External-Usermode
2 | pretty solid features - external cs2
3 |
4 |
5 | unknowncheats:
6 | https://www.unknowncheats.me/forum/counter-strike-2-a/619124-cs2-external-cheat-base.html
7 |
8 | you can find the compiled cheat on UC
9 |
10 | Screenshots
11 | https://prnt.sc/NmnlgHTiAXwY
12 | https://prnt.sc/W88Jbq4lZ8Fj
13 | https://prnt.sc/9aNByvQHNH0D
14 |
--------------------------------------------------------------------------------
/cs2 external.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.7.34031.279
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cs2-external-evo", "cs2-external-evo.vcxproj", "{BFAFCAC4-25DC-492F-B22D-5D17FD3C41B8}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|x64 = Debug|x64
11 | Debug|x86 = Debug|x86
12 | Release|x64 = Release|x64
13 | Release|x86 = Release|x86
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {BFAFCAC4-25DC-492F-B22D-5D17FD3C41B8}.Debug|x64.ActiveCfg = Debug|x64
17 | {BFAFCAC4-25DC-492F-B22D-5D17FD3C41B8}.Debug|x64.Build.0 = Debug|x64
18 | {BFAFCAC4-25DC-492F-B22D-5D17FD3C41B8}.Debug|x86.ActiveCfg = Debug|Win32
19 | {BFAFCAC4-25DC-492F-B22D-5D17FD3C41B8}.Debug|x86.Build.0 = Debug|Win32
20 | {BFAFCAC4-25DC-492F-B22D-5D17FD3C41B8}.Release|x64.ActiveCfg = Release|x64
21 | {BFAFCAC4-25DC-492F-B22D-5D17FD3C41B8}.Release|x64.Build.0 = Release|x64
22 | {BFAFCAC4-25DC-492F-B22D-5D17FD3C41B8}.Release|x86.ActiveCfg = Release|Win32
23 | {BFAFCAC4-25DC-492F-B22D-5D17FD3C41B8}.Release|x86.Build.0 = Release|Win32
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {987F1B74-6BDE-406D-AD42-8AAD2AFDD8DE}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/cs2-external-evo.vcxproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | Win32
7 |
8 |
9 | Release
10 | Win32
11 |
12 |
13 | Debug
14 | x64
15 |
16 |
17 | Release
18 | x64
19 |
20 |
21 |
22 | 17.0
23 | Win32Proj
24 | {bfafcac4-25dc-492f-b22d-5d17fd3c41b8}
25 | cs2externalevo
26 | 10.0
27 | unknowncheats
28 |
29 |
30 |
31 | Application
32 | true
33 | v143
34 | Unicode
35 |
36 |
37 | Application
38 | false
39 | v143
40 | true
41 | Unicode
42 |
43 |
44 | Application
45 | true
46 | v143
47 | Unicode
48 |
49 |
50 | Application
51 | false
52 | v143
53 | true
54 | Unicode
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 | C:\Users\dutu\Desktop\cs2-external-fhook\fhook\thirdparty\freetype\include;C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;$(IncludePath)
76 | C:\Users\dutu\Desktop\cs2-external-fhook\fhook\thirdparty\freetype\objs;C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x64;$(LibraryPath)
77 |
78 |
79 | C:\Users\segdg\Desktop\Neuer Ordner %282%29\fhook\thirdparty\freetype\include;C:\Users\Frezzy\Desktop\frezzyhook2 cs\fhook\thirdparty\freetype\include;C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Include;$(IncludePath)
80 | C:\Users\segdg\Desktop\Neuer Ordner %282%29\fhook\thirdparty\freetype\objs;C:\Users\Frezzy\Desktop\frezzyhook2 cs\fhook\thirdparty\freetype\objs;C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x64;$(LibraryPath)
81 |
82 |
83 |
84 | Level3
85 | true
86 | WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
87 | true
88 |
89 |
90 | Console
91 | true
92 |
93 |
94 |
95 |
96 | Level3
97 | true
98 | true
99 | true
100 | WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
101 | true
102 |
103 |
104 | Console
105 | true
106 | true
107 | true
108 |
109 |
110 |
111 |
112 | Level3
113 | true
114 | _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
115 | true
116 | stdcpplatest
117 |
118 |
119 | Console
120 | true
121 |
122 |
123 |
124 |
125 | Level3
126 | true
127 | true
128 | true
129 | NDEBUG;_CONSOLE;%(PreprocessorDefinitions)
130 | true
131 | stdcpplatest
132 |
133 |
134 | Console
135 | true
136 | true
137 | true
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 |
201 |
202 |
203 |
204 |
205 |
206 |
207 |
208 |
209 |
210 |
211 |
212 |
213 |
214 |
215 |
216 |
--------------------------------------------------------------------------------
/cs2-external-evo.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
6 | cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx
7 |
8 |
9 | {93995380-89BD-4b04-88EB-625FBE52EBFB}
10 | h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd
11 |
12 |
13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
15 |
16 |
17 |
18 |
19 | Header Files
20 |
21 |
22 | Header Files
23 |
24 |
25 | Header Files
26 |
27 |
28 | Header Files
29 |
30 |
31 | Header Files
32 |
33 |
34 | Header Files
35 |
36 |
37 | Header Files
38 |
39 |
40 | Header Files
41 |
42 |
43 | Header Files
44 |
45 |
46 | Header Files
47 |
48 |
49 | Header Files
50 |
51 |
52 | Header Files
53 |
54 |
55 | Header Files
56 |
57 |
58 | Header Files
59 |
60 |
61 | Header Files
62 |
63 |
64 | Header Files
65 |
66 |
67 | Header Files
68 |
69 |
70 | Header Files
71 |
72 |
73 | Header Files
74 |
75 |
76 | Header Files
77 |
78 |
79 | Header Files
80 |
81 |
82 | Header Files
83 |
84 |
85 | Header Files
86 |
87 |
88 | Header Files
89 |
90 |
91 | Header Files
92 |
93 |
94 | Header Files
95 |
96 |
97 | Header Files
98 |
99 |
100 | Header Files
101 |
102 |
103 | Header Files
104 |
105 |
106 | Header Files
107 |
108 |
109 | Header Files
110 |
111 |
112 | Header Files
113 |
114 |
115 | Header Files
116 |
117 |
118 | Header Files
119 |
120 |
121 | Header Files
122 |
123 |
124 | Header Files
125 |
126 |
127 | Header Files
128 |
129 |
130 | Header Files
131 |
132 |
133 | Header Files
134 |
135 |
136 | Header Files
137 |
138 |
139 | Header Files
140 |
141 |
142 |
143 |
144 | Source Files
145 |
146 |
147 | Source Files
148 |
149 |
150 | Source Files
151 |
152 |
153 | Source Files
154 |
155 |
156 | Source Files
157 |
158 |
159 | Source Files
160 |
161 |
162 | Source Files
163 |
164 |
165 | Source Files
166 |
167 |
168 | Source Files
169 |
170 |
171 | Source Files
172 |
173 |
174 | Source Files
175 |
176 |
177 | Source Files
178 |
179 |
180 | Source Files
181 |
182 |
183 | Source Files
184 |
185 |
186 | Source Files
187 |
188 |
189 | Source Files
190 |
191 |
192 | Source Files
193 |
194 |
195 | Source Files
196 |
197 |
198 | Source Files
199 |
200 |
201 | Source Files
202 |
203 |
204 | Source Files
205 |
206 |
207 | Source Files
208 |
209 |
210 | Source Files
211 |
212 |
213 | Source Files
214 |
215 |
216 | Source Files
217 |
218 |
219 | Source Files
220 |
221 |
222 | Source Files
223 |
224 |
225 | Source Files
226 |
227 |
228 |
--------------------------------------------------------------------------------
/cs2-external-evo.vcxproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/fhook/core/core.cpp:
--------------------------------------------------------------------------------
1 | #define WIN32_LEAN_AND_MEAN
2 |
3 | #include "../inc.hpp"
4 |
5 | int main( ) {
6 | SetConsoleTitle( L"unknowncheats.com" );
7 |
8 | auto process_status = _proc_manager.attach( "cs2.exe" );
9 |
10 | switch ( process_status ) {
11 | case 1:
12 | goto END;
13 | case 2:
14 | goto END;
15 | case 3:
16 | goto END;
17 | default:
18 | break;
19 | }
20 |
21 | if ( !unknowncheats::framework::m_b_initialized )
22 | unknowncheats::framework::create( );
23 |
24 | if ( !unknowncheats::_interfaces->initialize( ) ) {
25 | printf( "[unknowncheats] failtd to init offsets\n" );
26 | goto END;
27 | }
28 |
29 | printf( "[unknowncheats] initialized interfaces!\n" );
30 |
31 | if ( !unknowncheats::_address->initialize( ) ) {
32 | printf( "[unknowncheats] failtd to init addresses\n" );
33 | goto END;
34 | }
35 |
36 | while ( !unknowncheats::framework::unloading ) {
37 | if ( !unknowncheats::framework::render( ) )
38 | return 0;
39 |
40 | std::this_thread::sleep_for( std::chrono::milliseconds( 1 ) );
41 | }
42 |
43 | END:
44 | std::cout << std::endl;
45 | system( "pause" );
46 | return 0;
47 | }
--------------------------------------------------------------------------------
/fhook/core/ctx/ctx.cpp:
--------------------------------------------------------------------------------
1 | #include "../../inc.hpp"
2 |
3 | DWORD64 search_for_offset ( std::string Signature, DWORD64 ModuleAddress ) {
4 | std::vector TempAddressList;
5 | DWORD64 Address = 0;
6 | DWORD Offsets = 0;
7 |
8 | TempAddressList = _proc_manager.search_memory( Signature, ModuleAddress, ModuleAddress + 0x4000000 );
9 |
10 | if ( TempAddressList.size( ) <= 0 )
11 | return 0;
12 |
13 | if ( !_proc_manager.read_memory( TempAddressList.at( 0 ) + 3, Offsets ) )
14 | return 0;
15 |
16 | Address = TempAddressList.at( 0 ) + Offsets + 7;
17 | return Address;
18 | }
19 |
20 | using dword = DWORD64;
21 |
22 | bool unknowncheats::interface_t::initialize( ) {
23 | dword client_dll = reinterpret_cast< DWORD64 >( _proc_manager.get_process_module_handle( "client.dll" ) );
24 | dword server_dll = reinterpret_cast< DWORD64 >( _proc_manager.get_process_module_handle( "server.dll" ) );
25 |
26 | if ( client_dll == 0 || server_dll == 0 ) {
27 | printf( "[unknowncheats] invalid 1\n" );
28 | return false;
29 | }
30 |
31 | dword temp = 0;
32 |
33 | /* entity list */
34 | temp = search_for_offset( unknowncheats::signatures::entity_list, client_dll );
35 | if ( temp == 0 ) {
36 | printf( "[unknowncheats] invalid unknowncheats::signatures::entity_list\n" );
37 | return false;
38 | }
39 |
40 | /* dump offset */
41 | unknowncheats::dragged_offsets::entity_list = temp - client_dll;
42 |
43 | /* local player */
44 | temp = search_for_offset( unknowncheats::signatures::local_player_controller, client_dll );
45 | if ( temp == 0 ) {
46 | printf( "[unknowncheats] invalid unknowncheats::signatures::local_player_controller\n" );
47 | return false;
48 | }
49 |
50 | /* dump offset */
51 | unknowncheats::dragged_offsets::local_player_controller = temp - client_dll;
52 |
53 | /* view matrix */
54 | temp = search_for_offset( unknowncheats::signatures::view_matrix, client_dll );
55 | if ( temp == 0 ) {
56 | printf( "[unknowncheats] invalid unknowncheats::signatures::view_matrix\n" );
57 | return false;
58 | }
59 |
60 | /* dump offset */
61 | unknowncheats::dragged_offsets::matrix = temp - client_dll;
62 |
63 | /* global vars */
64 | temp = search_for_offset( unknowncheats::signatures::global_vars, client_dll );
65 | if ( temp == 0 ) {
66 | printf( "[unknowncheats] invalid unknowncheats::signatures::global_vars\n" );
67 | return false;
68 | }
69 |
70 | /* dump offset */
71 | unknowncheats::dragged_offsets::global_vars = temp - client_dll;
72 |
73 | /* view angle */
74 | temp = search_for_offset( unknowncheats::signatures::view_angles, client_dll );
75 | if ( temp == 0 ) {
76 | printf( "[unknowncheats] invalid unknowncheats::signatures::view_angles\n" );
77 | return false;
78 | }
79 |
80 | /* dump offset */
81 | unknowncheats::dragged_offsets::view_angle = temp - client_dll;
82 |
83 | /* localpawn */
84 | temp = search_for_offset( unknowncheats::signatures::local_player_pawn, client_dll );
85 | if ( temp == 0 ) {
86 | printf( "[unknowncheats] invalid unknowncheats::signatures::local_player_pawn\n" );
87 | return false;
88 | }
89 |
90 | /* dump offset */
91 | unknowncheats::dragged_offsets::local_player_pawn = temp + 0x138 - client_dll;
92 |
93 | /* force jump */
94 | temp = search_for_offset( unknowncheats::signatures::force_jump, client_dll );
95 | if ( temp == 0 ) {
96 | printf( "[unknowncheats] invalid unknowncheats::signatures::force_jump\n" );
97 | return false;
98 | }
99 |
100 | /* dump offset */
101 | unknowncheats::dragged_offsets::force_jump = temp + 0x30 - client_dll;
102 |
103 | /* planted c4 */
104 | temp = search_for_offset( unknowncheats::signatures::planted_c4, client_dll );
105 | if ( temp == 0 ) {
106 | printf( "[unknowncheats] invalid unknowncheats::signatures::planted_c4\n" );
107 | return false;
108 | }
109 |
110 | /* dump offset */
111 | unknowncheats::dragged_offsets::planted_c4 = temp - client_dll;
112 |
113 | return true;
114 | }
115 |
116 | bool unknowncheats::address_t::initialize( ) {
117 | this->game.client_dll = reinterpret_cast< DWORD64 >( _proc_manager.get_process_module_handle( "client.dll" ) );
118 | this->game.server_dll = reinterpret_cast< DWORD64 >( _proc_manager.get_process_module_handle( "server.dll" ) );
119 |
120 | this->game.entity_list = get_client_dll_address( ) + unknowncheats::dragged_offsets::entity_list;
121 | this->game.matrix = get_client_dll_address( ) + unknowncheats::dragged_offsets::matrix;
122 | this->game.view_angle = get_client_dll_address( ) + unknowncheats::dragged_offsets::view_angle;
123 | this->game.local_controller = get_client_dll_address( ) + unknowncheats::dragged_offsets::local_player_controller;
124 | this->game.local_pawn = get_client_dll_address( ) + unknowncheats::dragged_offsets::local_player_pawn;
125 | this->game.server_pawn = get_client_dll_address( ) + unknowncheats::dragged_offsets::local_player_pawn;
126 | this->game.force_jump = get_client_dll_address( ) + unknowncheats::dragged_offsets::force_jump;
127 | this->game.global_vars = get_client_dll_address( ) + unknowncheats::dragged_offsets::global_vars;
128 |
129 | printf( "[unknowncheats] initialized dll addresses!\n" );
130 |
131 | return this->game.client_dll != 0;
132 | }
133 |
134 | DWORD64 unknowncheats::address_t::get_client_dll_address( ) {
135 | return this->game.client_dll;
136 | }
137 |
138 | DWORD64 unknowncheats::address_t::get_server_dll_address( ) {
139 | return this->game.server_dll;
140 | }
141 |
142 | DWORD64 unknowncheats::address_t::get_entity_list_address( ) {
143 | return this->game.entity_list;
144 | }
145 |
146 | DWORD64 unknowncheats::address_t::get_matrix_address( ) {
147 | return this->game.matrix;
148 | }
149 |
150 | DWORD64 unknowncheats::address_t::get_view_angle_address( ) {
151 | return this->game.view_angle;
152 | }
153 |
154 | DWORD64 unknowncheats::address_t::get_entity_list_entry( ) {
155 | return this->game.entity_list_entry;
156 | }
157 |
158 | DWORD64 unknowncheats::address_t::get_local_controller_address( ) {
159 | return this->game.local_controller;
160 | }
161 |
162 | DWORD64 unknowncheats::address_t::get_local_pawn_address( ) {
163 | return this->game.local_pawn;
164 | }
165 |
166 | DWORD64 unknowncheats::address_t::get_server_pawn_address( ) {
167 | return this->game.server_pawn;
168 | }
169 |
170 | DWORD64 unknowncheats::address_t::get_global_vars_address( ) {
171 | return this->game.global_vars;
172 | }
173 |
174 | bool unknowncheats::address_t::update_entity_list_entry( ) {
175 | DWORD64 entity_list_entry = 0;
176 |
177 | if ( !_proc_manager.read_memory( this->get_entity_list_address( ), entity_list_entry ) ) {
178 | #ifdef read_data_dbg
179 | print_with_data_scoped( "address_t::update_entity_list_entry -> error -> 1" );
180 | #endif // read_data_dbg
181 | return false;
182 | }
183 |
184 | if ( !_proc_manager.read_memory( entity_list_entry + 0x10, entity_list_entry ) ) {
185 | #ifdef read_data_dbg
186 | print_with_data_scoped( "address_t::update_entity_list_entry -> error -> 2" );
187 | #endif // read_data_dbg
188 | return false;
189 | }
190 |
191 | this->game.entity_list_entry = entity_list_entry;
192 |
193 | return this->game.entity_list_entry != 0;
194 | }
195 |
196 | bool unknowncheats::address_t::set_view_angle( float yaw, float pitch ) {
197 | vec2_t Angle{ pitch, yaw };
198 |
199 | if ( !_proc_manager.write_memory( this->game.view_angle, Angle ) )
200 | return false;
201 |
202 | return false;
203 | }
204 |
205 | bool unknowncheats::address_t::set_force_jump( int value ) {
206 | if ( !_proc_manager.write_memory( this->game.force_jump, value ) )
207 | return false;
208 |
209 | return true;
210 | }
211 |
212 | bool unknowncheats::address_t::get_force_jump( int& value ) {
213 | if ( !_proc_manager.read_memory( this->game.force_jump, value ) )
214 | return false;
215 |
216 | return true;
217 | }
218 |
--------------------------------------------------------------------------------
/fhook/core/ctx/ctx.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace unknowncheats {
4 | class interface_t {
5 | public:
6 | bool initialize( );
7 | };
8 |
9 | class address_t {
10 | public:
11 | bool initialize( );
12 |
13 | view_t view;
14 | private:
15 | struct {
16 | DWORD64 server_dll;
17 | DWORD64 client_dll;
18 | DWORD64 entity_list;
19 | DWORD64 matrix;
20 | DWORD64 view_angle;
21 | DWORD64 entity_list_entry;
22 | DWORD64 local_controller;
23 | DWORD64 local_pawn;
24 | DWORD64 server_pawn;
25 | DWORD64 force_jump;
26 | DWORD64 global_vars;
27 |
28 | } game;
29 | public:
30 | DWORD64 get_client_dll_address( );
31 | DWORD64 get_server_dll_address( );
32 | DWORD64 get_entity_list_address( );
33 | DWORD64 get_matrix_address( );
34 | DWORD64 get_view_angle_address( );
35 | DWORD64 get_entity_list_entry( );
36 | DWORD64 get_local_controller_address( );
37 | DWORD64 get_local_pawn_address( );
38 | DWORD64 get_server_pawn_address( );
39 | DWORD64 get_global_vars_address( );
40 |
41 | bool update_entity_list_entry( );
42 |
43 | bool set_view_angle( float yaw, float pitch );
44 |
45 | bool set_force_jump( int value );
46 | bool get_force_jump( int& value );
47 |
48 | };
49 |
50 | inline const auto _interfaces = std::make_unique< interface_t>( );
51 | inline const auto _address = std::make_unique< address_t>( );
52 | }
--------------------------------------------------------------------------------
/fhook/framework/config/cfg.cpp:
--------------------------------------------------------------------------------
1 | #include "../../inc.hpp"
2 |
3 | bool unknowncheats::settings_t::save( std::string file_name ) {
4 | std::string file_path = "C:\\cs2_internal\\" + file_name + ".cfg";
5 |
6 | std::fstream file( file_path, std::ios::out | std::ios::in | std::ios::trunc );
7 | file.close( );
8 |
9 | file.open( file_path, std::ios::out | std::ios::in );
10 | if ( !file.is_open( ) ) {
11 | file.close( );
12 | return false;
13 | }
14 |
15 | const size_t settings_size = sizeof( unknowncheats::settings_t );
16 | for ( int i = 0; i < settings_size; i++ ) {
17 | byte current_byte = *reinterpret_cast< byte* >( uintptr_t( this ) + i );
18 | for ( int x = 0; x < 8; x++ ) {
19 | file << ( int )( ( current_byte >> x ) & 1 );
20 | }
21 | }
22 |
23 | file.close( );
24 |
25 | return true;
26 | }
27 |
28 | bool unknowncheats::settings_t::load( std::string file_name ) {
29 | CreateDirectory( L"C:\\cs2_internal", NULL );
30 | std::string file_path = "C:\\cs2_internal\\" + file_name + ".cfg";
31 |
32 | std::fstream file;
33 | file.open( file_path, std::ios::out | std::ios::in );
34 | if ( !file.is_open( ) ) {
35 | file.close( );
36 | return false;
37 | }
38 |
39 | std::string line;
40 | while ( file ) {
41 | std::getline( file, line );
42 |
43 | const size_t settings_size = sizeof( unknowncheats::settings_t );
44 | if ( line.size( ) > settings_size * 8 ) {
45 | file.close( );
46 | return false;
47 | }
48 | for ( int i = 0; i < settings_size; i++ ) {
49 | byte current_byte = *reinterpret_cast< byte* >( uintptr_t( this ) + i );
50 | for ( int x = 0; x < 8; x++ ) {
51 | if ( line[ ( i * 8 ) + x ] == '1' )
52 | current_byte |= 1 << x;
53 | else
54 | current_byte &= ~( 1 << x );
55 | }
56 | *reinterpret_cast< byte* >( uintptr_t( this ) + i ) = current_byte;
57 | }
58 | }
59 |
60 | file.close( );
61 |
62 | return true;
63 | }
64 |
--------------------------------------------------------------------------------
/fhook/framework/config/cfg.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace unknowncheats {
4 | class settings_t {
5 | public:
6 | bool save( std::string file_name );
7 | bool load( std::string file_name );
8 |
9 | /* variables */
10 | bool bounding_box = false;
11 | float box_color[ 4 ] = { 1.0f, 1.0f, 1.0f, 1.0f };
12 | float box_color_inv[ 4 ] = { 1.0f, 1.0f, 1.0f, 1.0f };
13 |
14 | bool dormancy = false;
15 | bool name_esp = false;
16 | float name_color[ 4 ] = { 1.0f, 1.0f, 1.0f, 1.0f };
17 | float name_color_a[ 4 ] = { 1.0f, 1.0f, 1.0f, 1.0f };
18 | float name_color_inv[ 4 ] = { 1.0f, 1.0f, 1.0f, 1.0f };
19 | int name_at = 0;
20 | bool name_animation = false;
21 |
22 | bool health_bar = false;
23 | bool customhealthbar = false;
24 | float healthbar[ 4 ] = { 1.0f, 1.0f, 1.0f, 1.0f };
25 | float healthbari[ 4 ] = { 1.0f, 1.0f, 1.0f, 1.0f };
26 |
27 | bool ammobar = false;
28 | float ammobar_color[ 4 ] = { 1.0f, 1.0f, 1.0f, 1.0f };
29 | float ammobar_color_inv[ 4 ] = { 1.0f, 1.0f, 1.0f, 1.0f };
30 |
31 | bool eap = false;
32 | float eap_color[ 4 ] = { 1.0f, 1.0f, 1.0f, 1.0f };
33 | float eap_color_inv[ 4 ] = { 1.0f, 1.0f, 1.0f, 1.0f };
34 |
35 | bool bones_h = false;
36 | bool bones = false;
37 | float bone_color[ 4 ] = { 1.0f, 1.0f, 1.0f, 1.0f };
38 | float bone_color_inv[ 4 ] = { 1.0f, 1.0f, 1.0f, 1.0f };
39 |
40 | bool flags = false;
41 |
42 | bool show_competivie_wins = false;
43 | bool show_dmg_dealt = false;
44 |
45 | bool change_by_visibility = false;
46 |
47 |
48 | /* triggerbot */
49 | bool triggerbot = false;
50 | int activationz_type = 0; // hold - toggle - always on
51 | int triggerkey = 1;
52 |
53 | int reaction_time = 0;
54 | int shot_delay = 0;
55 |
56 | bool aimbot = false;
57 | float fov = 0;
58 | float smooth = 0;
59 | int aim_distance_max = 200;
60 | bool visible_check = true; // autowall
61 | int hitbox = 0;
62 | bool draw_fov = false;
63 | float fov_color[ 4 ] = { 1.0f, 1.0f, 1.0f, 1.0f };
64 |
65 | /* other shit for legitbot */
66 | bool legitbot_stuff[ 50 ];
67 | int legitbot_stuff_int[ 50 ];
68 | float legitbot_stuff_float[ 50 ];
69 |
70 | int a_activationz_type = 0; // hold - toggle - always on
71 | int a_triggerkey = 29;
72 |
73 | bool rage = false;
74 | int rage_fov = 10;
75 | bool ignore_wall = true;
76 | int rage_hitbox = 0;
77 |
78 | bool change_smoke = false;
79 | float smoke_coloringol[ 4 ] = { 1.0f, 1.0f, 1.0f, 1.0f };
80 |
81 | bool remove_smoke = false;
82 |
83 |
84 | int ragebot_spot_type;
85 | bool ignore_if_Distance_tO_high;
86 | int distance_to_rage;
87 |
88 | bool ragebot_stuff[ 50 ];
89 | int ragebot_stuff2[ 50 ];
90 | float ragebot_stuff3[ 50 ];
91 |
92 | bool local_sound = false;
93 | bool enemy_sound = false;
94 |
95 | int local_range = 30;
96 | int enemy_range = 30;
97 |
98 | float sound_animation_speed_l = 0.1f;
99 | float sound_animation_speed_e = 0.1f;
100 |
101 | float sound_col_l[ 4 ] = { 1.0f, 1.0f, 1.0f, 1.0f };
102 | float sound_col_e[ 4 ] = { 1.0f, 1.0f, 1.0f, 1.0f };
103 |
104 |
105 | bool flash_builder = false;
106 | bool remove_full_flash = false;
107 | float flash_alpha = 255.f;
108 | float flash_time = 0.5f;
109 |
110 | bool killedby_hs = false;
111 |
112 | bool hitsound = false;
113 | bool hitsounduh = false;
114 | int hitsound_type = 0;
115 | bool hitmarker = false;
116 | float hitmarker_col[ 4 ] = { 1.0f, 1.0f, 1.0f, 1.0f };
117 |
118 | bool visuals_b[ 120 ]{ false };
119 | int visuals_i[ 120 ]{ 0 };
120 | float visuals_c[120][ 4 ]{ 1.0f, 1.0f, 1.0f, 1.0f };
121 | };
122 |
123 | inline const auto _settings = std::make_unique< settings_t >( );
124 | }
--------------------------------------------------------------------------------
/fhook/framework/framework.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace unknowncheats {
4 | namespace framework {
5 | inline bool m_b_initialized = false;
6 | inline bool unloading = false;
7 | inline bool m_b_open = false;
8 | inline int m_i_width = 1920;
9 | inline int m_i_height = 1080;
10 | inline unsigned int m_u_refresh_rate = 60;
11 |
12 | inline ID3D11Device* p_device = nullptr;
13 | inline ID3D11DeviceContext* p_context = nullptr;
14 | inline IDXGISwapChain* p_swap_chain = nullptr;
15 | inline ID3D11RenderTargetView* p_render_target_view = nullptr;
16 |
17 | inline WNDCLASSEXW window_class = { };
18 | inline HWND instance{ nullptr };
19 | inline HMODULE h_moudle{ nullptr };
20 |
21 | bool create( );
22 | bool render( );
23 | void destroy( );
24 | }
25 |
26 | class menu_t {
27 | public:
28 | void render( );
29 | void initialize( );
30 | };
31 |
32 | inline const auto _menu = std::make_unique< menu_t >( );
33 | }
34 |
--------------------------------------------------------------------------------
/fhook/hacks/ctx/hacks_ctx.cpp:
--------------------------------------------------------------------------------
1 | #include "hacks_ctx.hpp"
2 | #include "../../inc.hpp"
3 | #include "../../sdk/animation_system/animation_system.hpp"
4 |
5 | unknowncheats::c_entity* get_entity( int index ) { // just leave it like that
6 | unknowncheats::c_entity* ent = ( unknowncheats::c_entity* )( unknowncheats::_address->get_entity_list_entry() + 0x78 * ( index + 1 ) );
7 | return ent;
8 | }
9 |
10 | void unknowncheats::hacks_t::run( ) {
11 | /* update matrix */
12 | if ( !_proc_manager.read_memory( unknowncheats::_address->get_matrix_address( ), unknowncheats::_address->view.matrix, 64 ) ) {
13 | #ifdef read_data_dbg
14 | print_with_data_scoped( "hacks_t::run -> error -> read_memory::get_matrix_address" );
15 | #endif // read_data_dbg
16 | return;
17 | }
18 |
19 | /* update entity list entry */
20 | unknowncheats::_address->update_entity_list_entry( );
21 |
22 | /* local player stuff */
23 | DWORD64 local_player_adr = 0;
24 | DWORD64 local_pawn_adr = 0;
25 | if ( !_proc_manager.read_memory( unknowncheats::_address->get_local_controller_address( ), local_player_adr ) ) {
26 | #ifdef read_data_dbg
27 | print_with_data_scoped( "hacks_t::run -> error -> read_memory::get_local_controller_address" );
28 | #endif // read_data_dbg
29 | return;
30 | }
31 |
32 | if ( !_proc_manager.read_memory( unknowncheats::_address->get_local_pawn_address( ), local_pawn_adr ) ) {
33 | #ifdef read_data_dbg
34 | print_with_data_scoped( "hacks_t::run -> error -> read_memory::get_local_pawn_address" );
35 | #endif // read_data_dbg
36 | return;
37 | }
38 |
39 | unknowncheats::c_entity local_player;
40 | static int local_player_index = 1;
41 |
42 | if ( !local_player.update_controller( local_player_adr ) ) {
43 | #ifdef read_data_dbg
44 | print_with_data_scoped( "hacks_t::run -> error -> update_controller::local_player_adr" );
45 | #endif // read_data_dbg
46 | return;
47 | }
48 |
49 | if ( !local_player.update_pawn( local_pawn_adr ) ) {
50 | #ifdef read_data_dbg
51 | print_with_data_scoped( "hacks_t::run -> error -> update_pawn::local_pawn_adr" );
52 | #endif // read_data_dbg
53 | return;
54 | }
55 |
56 |
57 | /* loop between entity */
58 | for ( int i = 0; i < 64; i++ ) {
59 | c_entity entity;
60 | DWORD64 entity_address = 0;
61 |
62 | if ( !_proc_manager.read_memory( unknowncheats::_address->get_entity_list_entry( ) + ( i + 1 ) * 0x78, entity_address ) ) {
63 | #ifdef read_data_dbg1
64 | print_with_data_scoped( "hacks_t::run -> error -> loop::get_entity_list_entry" );
65 | #endif // read_data_dbg
66 | continue;
67 | }
68 |
69 | if ( entity_address == local_player.controller.address ) {
70 | local_player_index = i;
71 | continue;
72 | }
73 |
74 | if ( !entity.update_controller( entity_address ) ) {
75 | #ifdef read_data_dbg1
76 | print_with_data_scoped( "hacks_t::run -> error -> update_controller::entity_address" );
77 | #endif // read_data_dbg
78 | continue;
79 | }
80 |
81 | if ( !entity.update_pawn( entity.player_pawn.address ) ) {
82 | #ifdef read_data_dbg
83 | print_with_data_scoped( "hacks_t::run -> error -> update_pawn::entity.player_pawn.address" );
84 | #endif // read_data_dbg
85 | continue;
86 | }
87 |
88 | if ( entity.controller.team_id == local_player.controller.team_id ) {
89 | continue;
90 | }
91 |
92 | if ( !entity.in_screen( ) ) {
93 | continue;
94 | }
95 |
96 | unknowncheats::col_t col = unknowncheats::col_t( 255, 0, 0 );
97 | _proc_manager.write_memory( entity.player_pawn.address + 0xA73, col );
98 |
99 | _shots->hitmarker( entity, local_player );
100 |
101 | bool is = true;
102 | bool smth;
103 | float smth3;
104 | int smth4;
105 | DWORD64 smth2;
106 |
107 |
108 | #if 0
109 | #define int_3
110 | #ifdef int_
111 | _proc_manager.read_memory( local_player.player_pawn.address + 0x1537, smth4 );
112 | #elif defined(int_2)
113 | _proc_manager.read_memory( local_player.player_pawn.address + 0x15BC, smth3 );
114 | #elif defined(int_3)
115 | _proc_manager.read_memory( entity.player_pawn.address + 0x1668, smth );
116 | #endif
117 |
118 | #ifdef int_
119 | if ( GetKeyState( VK_F2 ) )
120 | print_with_data_scoped( "s: " + std::to_string( smth4 ) )
121 | #elif defined(int_2)
122 | if ( GetKeyState( VK_F2 ) )
123 | print_with_data_scoped( "s: " + std::to_string( smth3 ) )
124 | #elif defined(int_3)
125 | if ( GetKeyState( VK_F2 ) )
126 | print_with_data_scoped( "s: " + std::to_string( smth ) )
127 | #endif
128 | #endif
129 |
130 | _sound->push_sound2( entity, i );
131 |
132 | _legit->run_aimbot( entity, local_player, local_player.player_pawn.camera_pos, i, local_player_index );
133 | _rage->run_aimbot( entity, local_player, local_player.player_pawn.camera_pos, i, local_player_index );
134 |
135 | ImVec4 rect = unknowncheats::_esp->get_player_bounding_box( entity );
136 | unknowncheats::_esp->render_esp( local_player, entity, rect, local_player_index, i );
137 | unknowncheats::_esp->killed_by_hs( entity, i );
138 | }
139 |
140 | /* loop between other entity */
141 | for ( int i_smoke = 64; i_smoke < 1024; i_smoke++ ) {
142 | uintptr_t ent = ( uintptr_t )get_entity( i_smoke );
143 |
144 | if ( ent == 0 ) {
145 | #ifdef read_data_dbg
146 | print_with_data_scoped( "hacks_t::run2 -> error -> loop::continue - 1024 [ 0 ]" );
147 | #endif // read_data_dbg
148 | continue;
149 | }
150 |
151 | unknowncheats::_esp->change_smoke_color( ent );
152 | unknowncheats::_esp->remove_smoke( ent );
153 | }
154 |
155 | _legit->draw_aimbot_fov( );
156 | _sound->push_sound( local_player );
157 | _flash->run_flash_builder( local_player );
158 | _shots->hitsound( local_player );
159 |
160 | /*
161 | scoped: _proc_manager.read_memory( local_player.player_pawn.address + 0x13A8, smth );
162 | defusing: _proc_manager.read_memory( local_player.player_pawn.address + 0x13B0, smth );
163 | grabbing_hostage: _proc_manager.read_memory( local_player.player_pawn.address + 0x13B1, smth );
164 | gungame_imunity: _proc_manager.read_memory( local_player.player_pawn.address + 0x13C4, smth );
165 |
166 | shots fired, calc 1 shot, when u do shot : local_player.player_pawn.address + 0x1420
167 | is_flashed: _proc_manager.read_memory( local_player.player_pawn.address + 0x145C, smth3 ); // smth3 > 0
168 |
169 | */
170 |
171 |
172 |
173 |
174 | static int prev_total_hits;
175 | bool total_hits;
176 | float minexp;
177 | bool on = true;
178 | float min = 0.15;
179 |
180 | uintptr_t bullet_services;
181 |
182 | //_proc_manager.read_memory( local_player.controller.address + 0x1F4, bullet_services );
183 | //_proc_manager.read_memory( bullet_services + 0xD04, total_hits );
184 | //_proc_manager.read_memory( bullet_services + 0xD0C, minexp );
185 |
186 |
187 | //_proc_manager.write_memory( bullet_services + 0xCEC, min );
188 |
189 |
190 |
191 | bool is = true;
192 | bool smth;
193 | float smth3;
194 | int smth4;
195 |
196 | #if 0
197 | #define int_2
198 | #ifdef int_
199 | _proc_manager.read_memory( local_player.player_pawn.address + 0x1537, smth4 );
200 | #elif defined(int_2)
201 | _proc_manager.read_memory( local_player.player_pawn.address + 0x15BC, smth3 );
202 | #elif defined(int_3)
203 | _proc_manager.read_memory( local_player.player_pawn.address + 0x1537, smth );
204 | #endif
205 |
206 | #ifdef int_
207 | if ( GetKeyState( VK_F2 ) )
208 | print_with_data_scoped( "s: " + std::to_string( smth4 ) )
209 | #elif defined(int_2)
210 | if ( GetKeyState( VK_F2 ) )
211 | print_with_data_scoped( "s: " + std::to_string( smth3 ) )
212 | #elif defined(int_3)
213 | if ( GetKeyState( VK_F2 ) )
214 | print_with_data_scoped( "s: " + std::to_string( smth ) )
215 | #endif
216 | #endif
217 | float fl = 0.5f;
218 | //_proc_manager.write_memory( local_player.player_pawn.address + 0x15C0, fl );
219 | //_proc_manager.write_memory( local_player.player_pawn.address + 0x1464, fl );
220 |
221 | #if 0
222 | if ( smth ) {
223 | printf( "yes\n" );
224 | } else {
225 | printf( "no\n" );
226 | }
227 | #endif
228 |
229 |
230 | /* trigger bot */
231 | if ( _settings->triggerbot ) {
232 | switch ( _settings->activationz_type ) {
233 | case 0: /* hold */
234 | {
235 | if ( GetAsyncKeyState( _input_key->get_bind_id( _settings->triggerkey ) ) ) {
236 | _triggerbot->run_trigger( local_player );
237 | }
238 | } break;
239 | case 1: /* toggle */
240 | {
241 | if ( GetKeyState( _input_key->get_bind_id( _settings->triggerkey ) ) ) {
242 | _triggerbot->run_trigger( local_player );
243 | }
244 | } break;
245 | case 2: /* always on */
246 | {
247 | _triggerbot->run_trigger( local_player );
248 | } break;
249 | }
250 | }
251 | }
252 |
--------------------------------------------------------------------------------
/fhook/hacks/ctx/hacks_ctx.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | namespace unknowncheats {
5 | class hacks_t {
6 | public:
7 | void run( );
8 | };
9 |
10 | inline const auto _hacks = std::make_unique< hacks_t >( );
11 | }
--------------------------------------------------------------------------------
/fhook/hacks/features/esp/esp.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace unknowncheats {
4 | class esp_t {
5 | public:
6 | void setup_alpha( const c_entity& local_player, const c_entity& entity, int local_index, int index );
7 |
8 | void bounding_box( const c_entity& local_player, const c_entity& entity, ImVec4 rect, int local_index, int index );
9 | void render_name( const c_entity& local_player, const c_entity& entity, ImVec4 rect, int local_index, int index );
10 | void health_bar( const c_entity& local_player, const c_entity& entity, ImVec4 rect, int local_index, int index );
11 | void ammo_bar( const c_entity& local_player, const c_entity& entity, ImVec4 rect, int local_index, int index );
12 | void render_weapon( const c_entity& local_player, const c_entity& entity, ImVec4 rect, int local_index, int index );
13 | void skeleton_esp( const c_entity& local_player, const c_entity& entity, ImVec4 rect, int local_index, int index );
14 | void render_side_info( const c_entity& local_player, const c_entity& entity, ImVec4 rect, int local_index, int index );
15 | void render_dropped_esp( const c_entity& local_player, const c_entity& entity, ImVec4 rect, int local_index, int index );
16 | void render_distance( const c_entity& local_player, const c_entity& entity, ImVec4 rect, int local_index, int index );
17 | void render_taser_range( const c_entity& local_player, const c_entity& entity, ImVec4 rect, int local_index, int index );
18 | void change_smoke_color( uintptr_t ent );
19 | void remove_smoke( uintptr_t ent );
20 | void render_incendiary( );
21 | void killed_by_hs( const c_entity& entity, int i );
22 |
23 | void render_esp( const c_entity& local_player, const c_entity& entity, ImVec4 rect,
24 | int local_index, int index );
25 |
26 | unknowncheats::macros::vec4_t get_player_bounding_box( const c_entity& entity );
27 |
28 | bool spotted( const c_entity& entity, const c_entity& local_player, int local_index, int index ) {
29 | return ( ( entity.player_pawn.spotted_by_mask & ( DWORD64( 1 ) << local_index ) )
30 | || ( local_player.player_pawn.spotted_by_mask & ( DWORD64( 1 ) << index ) ) );
31 | }
32 |
33 | bool l_spotted( const c_entity& entity, const c_entity& local_player, int local_index, int index ) {
34 | return ( ( entity.player_pawn.spotted_by_mask & ( DWORD64( 1 ) << local_index ) ) );
35 | }
36 |
37 | bool e_spotted( const c_entity& entity, const c_entity& local_player, int local_index, int index ) {
38 | return ( ( local_player.player_pawn.spotted_by_mask & ( DWORD64( 1 ) << index ) ) );
39 | }
40 | private:
41 | float esp_alpha[64]; /* max entity index */
42 | };
43 |
44 | inline const auto _esp = std::make_unique( );
45 | }
--------------------------------------------------------------------------------
/fhook/hacks/features/flash_builder/flash_builder.cpp:
--------------------------------------------------------------------------------
1 | #include "../../../inc.hpp"
2 |
3 | void unknowncheats::flash_builder::run_flash_builder( const c_entity& entity ) {
4 | if ( !_settings->flash_builder )
5 | return;
6 |
7 | if ( !_settings->remove_full_flash ) {
8 | float fl = _settings->flash_alpha;
9 | float fl_t = _settings->flash_time;
10 | _proc_manager.write_memory( entity.player_pawn.address + offsets::pawn::max_alpha, fl ); /* xref: m_flFlashMaxAlpha */
11 | _proc_manager.write_memory( entity.player_pawn.address + offsets::pawn::flash_Duration, fl_t ); /* xref: m_flFlashDuration */
12 |
13 | } else {
14 | // xref: m_flFlashBangTime
15 | float fl = 0.f;
16 | _proc_manager.write_memory( entity.player_pawn.address + offsets::pawn::flashbang_time, fl );
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/fhook/hacks/features/flash_builder/flash_builder.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace unknowncheats {
4 | class flash_builder {
5 | public:
6 | void run_flash_builder( const c_entity& entity );
7 | };
8 |
9 | inline const auto _flash = std::make_unique< flash_builder >( );
10 | }
--------------------------------------------------------------------------------
/fhook/hacks/features/grenade/grenades.cpp:
--------------------------------------------------------------------------------
1 | #include "../../../inc.hpp"
2 |
--------------------------------------------------------------------------------
/fhook/hacks/features/grenade/grenades.hpp:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/fhook/hacks/features/legitbot/legitbot.cpp:
--------------------------------------------------------------------------------
1 | #include "../../../inc.hpp"
2 | #include "../../../sdk/animation_system/animation_system.hpp"
3 |
4 | void unknowncheats::legit_t::run_aimbot( const c_entity& entity, const c_entity& local, vec3_t local_pos, int ent_idx, int local_idx ) {
5 | float yaw, pitch, distance, norm, lenght;
6 | vec3_t opp_pos;
7 | vec2_t angles{};
8 | int screen_center_x = 1920 / 2;
9 | int screen_center_y = 1080 / 2;
10 |
11 | /* hacks_ctx.cpp */
12 | float distance_to_sight = 0;
13 | float max_aim_distance = 1500;
14 | vec3_t aim_pos{ 0, 0, 0 };
15 |
16 | bool body_if_lethal = _settings->legitbot_stuff[ 9 ] && local.player_pawn.health < 30;
17 |
18 | /* hitbox shit */
19 | if ( !body_if_lethal ) {
20 | switch ( unknowncheats::_settings->hitbox ) {
21 | case 0:
22 | {
23 | _legit->aim_position = bone_index::head;
24 | } break;
25 | case 1:
26 | {
27 | _legit->aim_position = bone_index::neck_0;
28 | } break;
29 | case 2:
30 | {
31 | _legit->aim_position = bone_index::spine_1;
32 | } break;
33 | case 3:
34 | {
35 | _legit->aim_position = bone_index::pelvis;
36 | } break;
37 | }
38 | } else if ( body_if_lethal ) {
39 | _legit->aim_position = bone_index::pelvis;
40 | }
41 |
42 | distance_to_sight = entity.get_bone( ).bone_pos_list[ bone_index::head ].screen_pos.dist_to( { ( 1920 / 2 ), ( 1080 / 2 ) } );
43 | if ( distance_to_sight < max_aim_distance ) {
44 | max_aim_distance = distance_to_sight;
45 |
46 | if ( !_settings->visible_check || entity.player_pawn.spotted_by_mask & ( DWORD64( 1 ) << ( local_idx ) ) || local.player_pawn.spotted_by_mask & ( DWORD64( 1 ) << ( ent_idx ) ) ) {
47 | aim_pos = entity.get_bone( ).bone_pos_list[ _legit->aim_position ].pos;
48 |
49 | if ( _legit->aim_position == bone_index::head )
50 | aim_pos.z -= 1.f;
51 | }
52 | }
53 |
54 | //bool[9] // last used
55 |
56 | /* dinamic scale will work when u use the aimbot */
57 | bool use_dinamic_while_moving = _settings->legitbot_stuff[ 1 ] && entity.player_pawn.vec_velocity.length( ) > 50.f;
58 | bool use_dinamic_while_player_lethal = _settings->legitbot_stuff[ 2 ] && entity.player_pawn.health < 30;
59 | bool use_dinamic_while_local_is_lethal = _settings->legitbot_stuff[ 3 ] && local.player_pawn.health < 30;
60 | bool use_dinamic_while_good_player = _settings->legitbot_stuff[ 7 ] && entity.controller.total_dmg > _settings->legitbot_stuff_int[0];
61 | static float dinamic_scale[4]; /* run this static, whatever */
62 |
63 | /* dinamic smooth */
64 | bool use_dinamic_smoth_1 = _settings->legitbot_stuff[ 5 ] && entity.player_pawn.vec_velocity.length( ) > 50.f;
65 | bool use_dinamic_smoth_2 = _settings->legitbot_stuff[ 6 ] && local.player_pawn.health < 30;
66 | bool use_dinamic_while_good_player2 = _settings->legitbot_stuff[ 8 ] && entity.controller.total_dmg > _settings->legitbot_stuff_int[ 2 ];
67 | static float dinamic_smooth[ 3 ]; /* run this static, whatever */
68 |
69 | if ( _settings->aimbot ) {
70 | switch ( _settings->a_activationz_type ) {
71 | case 0: /* hold */
72 | {
73 | if ( !GetAsyncKeyState( _input_key->get_bind_id( _settings->a_triggerkey ) ) ) {
74 | dinamic_scale[ 0 ] = 0.f; /* reset */
75 | dinamic_scale[ 1 ] = 0.f; /* reset */
76 | dinamic_scale[ 2 ] = 0.f; /* reset */
77 | dinamic_scale[ 3 ] = 0.f; /* reset */
78 | this->dinamic_csale = 0.f;
79 |
80 | dinamic_smooth[ 0 ] = 0.f;
81 | dinamic_smooth[ 1 ] = 0.f;
82 | dinamic_smooth[ 2 ] = 0.f;
83 | this->dinamic_smoth = 0.f;
84 |
85 | return;
86 | }
87 | } break;
88 | case 1: /* toggle */
89 | {
90 | if ( !GetKeyState( _input_key->get_bind_id( _settings->a_triggerkey ) ) ) {
91 | dinamic_scale[ 0 ] = 0.f; /* reset */
92 | dinamic_scale[ 1 ] = 0.f; /* reset */
93 | dinamic_scale[ 2 ] = 0.f; /* reset */
94 | dinamic_scale[ 3 ] = 0.f; /* reset */
95 | this->dinamic_csale = 0.f;
96 |
97 | dinamic_smooth[ 0 ] = 0.f;
98 | dinamic_smooth[ 1 ] = 0.f;
99 | dinamic_smooth[ 2 ] = 0.f;
100 | this->dinamic_smoth = 0.f;
101 | return;
102 | }
103 | } break;
104 | case 2: /* always on */
105 | {
106 | /* shit is always on*/
107 | } break;
108 | }
109 | } else if ( !_settings->aimbot ) {
110 | return;
111 | }
112 |
113 | /* paste fix */
114 | if ( aim_pos == vec3_t( 0, 0, 0 ) ) {
115 | dinamic_scale[0] = 0.f; /* reset */
116 | dinamic_scale[1] = 0.f; /* reset */
117 | dinamic_scale[2] = 0.f; /* reset */
118 | dinamic_scale[3] = 0.f; /* reset */
119 | this->dinamic_csale = 0.f;
120 |
121 | dinamic_smooth[ 0 ] = 0.f;
122 | dinamic_smooth[ 1 ] = 0.f;
123 | dinamic_smooth[ 2 ] = 0.f;
124 | this->dinamic_smoth = 0.f;
125 | return;
126 | }
127 |
128 | if ( framework::m_b_open ) {
129 | dinamic_scale[ 0 ] = 0.f; /* reset */
130 | dinamic_scale[ 1 ] = 0.f; /* reset */
131 | dinamic_scale[ 2 ] = 0.f; /* reset */
132 | dinamic_scale[ 3 ] = 0.f; /* reset */
133 | this->dinamic_csale = 0.f;
134 |
135 | dinamic_smooth[ 0 ] = 0.f;
136 | dinamic_smooth[ 1 ] = 0.f;
137 | dinamic_smooth[ 2 ] = 0.f;
138 | this->dinamic_smoth = 0.f;
139 | return;
140 | }
141 |
142 | if ( entity.player_pawn.health <= 0 ) {
143 | dinamic_scale[ 0 ] = 0.f; /* reset */
144 | dinamic_scale[ 1 ] = 0.f; /* reset */
145 | dinamic_scale[ 2 ] = 0.f; /* reset */
146 | dinamic_scale[ 3 ] = 0.f; /* reset */
147 | this->dinamic_csale = 0.f;
148 |
149 | dinamic_smooth[ 0 ] = 0.f;
150 | dinamic_smooth[ 1 ] = 0.f;
151 | dinamic_smooth[ 2 ] = 0.f;
152 | this->dinamic_smoth = 0.f;
153 | return;
154 | }
155 |
156 | if ( _settings->legitbot_stuff[ 0 ] ) { /* dinamic fov */
157 | /* some conditions so we dont overrun this shit */
158 | if ( use_dinamic_while_moving ) {
159 | /* enemy is moving that is not that much of bullshit */
160 | dinamic_scale[ 0 ] = 1.f; /* just 1.f added to fov, since he is moving, thats not much shit to do */
161 | } else {
162 | dinamic_scale[ 0 ] = 0.0f; /* reset it */
163 | }
164 |
165 | if ( use_dinamic_while_player_lethal ) {
166 | /* player is lethal, so we might want to hit it easier, we are going to add 1.3f */
167 | dinamic_scale[ 1 ] = 1.3f; /* just add to fov */
168 | } else {
169 | dinamic_scale[ 1 ] = 0.0f; /* just add to fov */
170 | }
171 |
172 | if ( use_dinamic_while_local_is_lethal ) {
173 | /* local is lethal, so we might want to hit it easier, we are going to add 0.5f */
174 | dinamic_scale[ 2 ] = 0.5f; /* just add to fov */
175 | } else {
176 | dinamic_scale[ 2 ] = 0.f;
177 | }
178 |
179 | if ( use_dinamic_while_good_player ) {
180 | /* player is lethal, so we might want to hit it easier, we are going to add 1.3f */
181 | dinamic_scale[ 3 ] = 1.f; /* just add to fov */
182 | } else {
183 | dinamic_scale[ 3 ] = 0.0f; /* just add to fov */
184 | }
185 |
186 | this->dinamic_csale = dinamic_scale[ 0 ] + dinamic_scale[ 1 ] + dinamic_scale[ 2 ];
187 | }
188 |
189 | /* reset if this is off */
190 | if ( !_settings->legitbot_stuff[ 0 ] ) {
191 | dinamic_scale[ 0 ] = 0.f; /* reset */
192 | dinamic_scale[ 1 ] = 0.f; /* reset */
193 | dinamic_scale[ 2 ] = 0.f; /* reset */
194 | this->dinamic_csale = 0.f;
195 | }
196 |
197 | /* dinamic smooth */
198 | if ( _settings->legitbot_stuff[ 4 ] ) {
199 | /* some conditions so we dont overrun this shit */
200 | if ( use_dinamic_smoth_1 ) {
201 | /* enemy is moving that is not that much of bullshit */
202 | dinamic_smooth[ 0 ] = 0.2f; /* just 1.f added to fov, since he is moving, thats not much shit to do */
203 | } else {
204 | dinamic_smooth[ 0 ] = 0.0f; /* reset it */
205 | }
206 |
207 | if ( use_dinamic_smoth_2 ) {
208 | /* player is lethal, so we might want to hit it easier, we are going to add 1.3f */
209 | dinamic_smooth[ 1 ] = 0.2f; /* just add to fov */
210 | } else {
211 | dinamic_smooth[ 1 ] = 0.0f; /* just add to fov */
212 | }
213 |
214 | if ( use_dinamic_while_good_player2 ) {
215 | /* player is lethal, so we might want to hit it easier, we are going to add 1.3f */
216 | dinamic_smooth[ 2 ] = 0.2f; /* just add to fov */
217 | } else {
218 | dinamic_smooth[ 2 ] = 0.0f; /* just add to fov */
219 | }
220 |
221 | this->dinamic_smoth = dinamic_smooth[ 0 ] + dinamic_smooth[ 1 ];
222 | }
223 |
224 | if ( !_settings->legitbot_stuff[ 4 ] ) {
225 | dinamic_smooth[ 0 ] = 0.f;
226 | dinamic_smooth[ 1 ] = 0.f;
227 | this->dinamic_smoth = 0.f;
228 | }
229 |
230 | /* fix */
231 | opp_pos = aim_pos - local_pos;
232 | distance = sqrt( pow( opp_pos.x, 2 ) + pow( opp_pos.y, 2 ) );
233 | lenght = sqrt( distance * distance + opp_pos.z * opp_pos.z );
234 |
235 | yaw = atan2f( opp_pos.y, opp_pos.x ) * 57.295779513 - local.player_pawn.viewangle.y;
236 | pitch = -atan( opp_pos.z / distance ) * 57.295779513 - local.player_pawn.viewangle.x;
237 | norm = sqrt( pow( yaw, 2 ) + pow( pitch, 2 ) );
238 |
239 | vec2_t screen_pos;
240 | _address->view.world_to_screen( vec3_t( aim_pos ), screen_pos );
241 |
242 | if ( norm >= ( _settings->fov + this->dinamic_csale ) ) {
243 | return; // If condition not met, exit early
244 | }
245 |
246 | float smooth_factor = ( ( _settings->smooth - this->dinamic_smoth ) != 0.0f ) ? ( _settings->smooth - this->dinamic_smoth ) : 1.5f;
247 |
248 | auto calculate_target = [ ]( int screen_pos, int screen_center, float smooth ) {
249 | return ( screen_pos != screen_center ) ? ( ( screen_pos > screen_center ) ? -( screen_center - screen_pos ) : ( screen_pos - screen_center ) ) / smooth : 0;
250 | };
251 |
252 | float target_x = calculate_target( screen_pos.x, screen_center_x, smooth_factor );
253 | float target_y = ( screen_pos.y != screen_center_y && screen_pos.y != 0 ) ? calculate_target( screen_pos.y, screen_center_y, smooth_factor ) : 0;
254 |
255 | if ( !_settings->smooth ) {
256 | mouse_event( MOUSEEVENTF_MOVE, target_x, target_y, NULL, NULL );
257 | return;
258 | }
259 |
260 | float distance_ratio = norm / ( _settings->fov + this->dinamic_csale );
261 | float speed_factor = 1.0f + ( 1.0f - distance_ratio );
262 |
263 | target_x = calculate_target( screen_pos.x, screen_center_x, smooth_factor ) / ( ( _settings->smooth - this->dinamic_smoth ) * speed_factor );
264 | target_y = ( screen_pos.y != screen_center_y && screen_pos.y != 0 ) ? calculate_target( screen_pos.y, screen_center_y, smooth_factor ) / ( ( _settings->smooth - this->dinamic_smoth ) * speed_factor ) : 0;
265 |
266 | mouse_event( MOUSEEVENTF_MOVE, target_x, target_y, NULL, NULL );
267 |
268 | }
269 |
270 | void unknowncheats::legit_t::draw_aimbot_fov( ) {
271 | if ( !_settings->draw_fov ) {
272 | return;
273 | }
274 |
275 | float screen_x = GetSystemMetrics( SM_CXSCREEN ) / 2.f;
276 | float screen_y = GetSystemMetrics( SM_CYSCREEN ) / 2.f;
277 |
278 | /* run animation */
279 | auto animation = animation_controller.get( "animation_fov" + std::to_string( 0 ) + animation_controller.current_child );
280 | animation.adjust( animation.value + 3.f * animation_controller.get_min_deltatime( 1.f ) * ( ( this->dinamic_csale > 0.f ) ? 1.f : -1.f ) );
281 |
282 | _render->add_circle( unknowncheats::vec2_t( screen_x, screen_y ), ( ( _settings->fov + this->dinamic_csale * animation.value ) * 10 ), _render->to_main_color( _settings->fov_color ) );
283 | }
284 |
--------------------------------------------------------------------------------
/fhook/hacks/features/legitbot/legitbot.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace unknowncheats {
4 | class legit_t {
5 | public:
6 | void run_aimbot( const c_entity& entity, const c_entity& local, vec3_t local_pos, int ent_idx, int local_idx );
7 | void draw_aimbot_fov( );
8 |
9 | float dinamic_csale{}, dinamic_smoth{};
10 |
11 | DWORD aim_position = bone_index::head;
12 | };
13 |
14 | inline const auto _legit = std::make_unique < legit_t >( );
15 | }
--------------------------------------------------------------------------------
/fhook/hacks/features/ragebot/ragebot.cpp:
--------------------------------------------------------------------------------
1 | #include "../../../inc.hpp"
2 |
3 | void release_mouse_event_rage( ) {
4 | /* we can now shot so lets do it */
5 | std::this_thread::sleep_for( std::chrono::milliseconds( unknowncheats::_settings->shot_delay ) ); /* add a custom delay and more */
6 | mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 ); /* release shot event */
7 | }
8 |
9 | void unknowncheats::rage_t::run_aimbot( const c_entity& entity, const c_entity& local, vec3_t local_pos, int ent_idx, int local_idx ) {
10 | // gheto ass pasted - aimstar with modifications
11 | if ( !_settings->rage )
12 | return;
13 |
14 | float yaw, pitch, distance, norm, lenght, target_x, target_y;
15 | vec3_t opp_pos;
16 | vec2_t angles{};
17 | int screen_center_x = 1920 / 2;
18 | int screen_center_y = 1080 / 2;
19 |
20 | /* hacks_ctx.cpp */
21 | float distance_to_sight = 0;
22 | float max_aim_distance = 1500;
23 | vec3_t aim_pos{ 0, 0, 0 };
24 |
25 | float distance_aim = local.player_pawn.vec_origin.dist_to( entity.player_pawn.vec_origin );
26 | if ( _settings->ignore_if_Distance_tO_high ) {
27 | if ( distance_aim > _settings->distance_to_rage ) {
28 | return; /* do not try for higher distance */
29 | }
30 | }
31 |
32 | // multipoint [0]
33 | bool b1 = unknowncheats::_settings->ragebot_stuff[ 1 ] && entity.player_pawn.health < 30;
34 | bool entity_lol = entity.player_pawn.health > local.player_pawn.health;
35 | bool b2 = unknowncheats::_settings->ragebot_stuff[ 2 ] && entity_lol;
36 |
37 | if ( _settings->ragebot_stuff[ 0 ] ) { /* thats the multipoint bruther */
38 |
39 | if ( !b1 || !b2 ) {
40 | switch ( _settings->ragebot_stuff2[ 0 ] ) {
41 | case 0:
42 | {
43 | this->aim_position = bone_index::head;
44 | } break;
45 | case 1:
46 | {
47 | this->aim_position = bone_index::pelvis;
48 | } break;
49 | }
50 | }
51 |
52 | if ( b1 || b2 ) {
53 | this->aim_position = bone_index::pelvis;
54 | }
55 |
56 | }
57 |
58 | /* hitbox shit */
59 | switch ( unknowncheats::_settings->rage_hitbox ) {
60 | case 0:
61 | {
62 | this->aim_position = bone_index::head;
63 | } break;
64 | case 1:
65 | {
66 | this->aim_position = bone_index::neck_0;
67 | } break;
68 | case 2:
69 | {
70 | this->aim_position = bone_index::spine_1;
71 | } break;
72 | case 3:
73 | {
74 | this->aim_position = bone_index::pelvis;
75 | } break;
76 | }
77 |
78 | distance_to_sight = entity.get_bone( ).bone_pos_list[ bone_index::head ].screen_pos.dist_to( { ( 1920 / 2 ), ( 1080 / 2 ) } );
79 | if ( distance_to_sight < max_aim_distance ) {
80 | max_aim_distance = distance_to_sight;
81 |
82 | if ( !_settings->ignore_wall || entity.player_pawn.spotted_by_mask & ( DWORD64( 1 ) << ( local_idx ) ) || local.player_pawn.spotted_by_mask & ( DWORD64( 1 ) << ( ent_idx ) ) ) {
83 | aim_pos = entity.get_bone( ).bone_pos_list[ this->aim_position ].pos;
84 |
85 | if ( this->aim_position == bone_index::head )
86 | aim_pos.z -= 1.f;
87 | }
88 | }
89 |
90 | /* paste fix */
91 | if ( aim_pos == vec3_t( 0, 0, 0 ) ) {
92 | return;
93 | }
94 |
95 | if ( framework::m_b_open ) {
96 | return;
97 | }
98 |
99 | if ( entity.player_pawn.health <= 0 ) {
100 | return;
101 | }
102 |
103 | /* fix */
104 | opp_pos = aim_pos - local_pos;
105 | distance = sqrt( pow( opp_pos.x, 2 ) + pow( opp_pos.y, 2 ) );
106 | lenght = sqrt( distance * distance + opp_pos.z * opp_pos.z );
107 |
108 | yaw = atan2f( opp_pos.y, opp_pos.x ) * 57.295779513 - local.player_pawn.viewangle.y;
109 | pitch = -atan( opp_pos.z / distance ) * 57.295779513 - local.player_pawn.viewangle.x;
110 | norm = sqrt( pow( yaw, 2 ) + pow( pitch, 2 ) );
111 |
112 | vec2_t screen_pos;
113 | _address->view.world_to_screen( vec3_t( aim_pos ), screen_pos );
114 |
115 | if ( norm < _settings->rage_fov ) {
116 | if ( screen_pos.x != screen_center_x ) {
117 | target_x = ( screen_pos.x > screen_center_x ) ? -( screen_center_x - screen_pos.x ) : screen_pos.x - screen_center_x;
118 | // target_x /= 0.5f;
119 | target_x = ( target_x + screen_center_x > screen_center_x * 2 || target_x + screen_center_x < 0 ) ? 0 : target_x;
120 | }
121 |
122 | if ( screen_pos.y != 0 ) {
123 | if ( screen_pos.y != screen_center_y ) {
124 | target_y = ( screen_pos.y > screen_center_y ) ? -( screen_center_y - screen_pos.y ) : screen_pos.y - screen_center_y;
125 | // target_y /= 0.5f;
126 | target_y = ( target_y + screen_center_y > screen_center_y * 2 || target_y + screen_center_y < 0 ) ? 0 : target_y;
127 | }
128 | }
129 |
130 | /* should be much better now */
131 | if ( ( target_x < 2 && target_y < 2 ) && _esp->l_spotted( entity, local, local_idx, ent_idx ) ) {
132 | mouse_event( MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 );
133 | std::thread trigger_thread( release_mouse_event_rage );
134 | trigger_thread.detach( );
135 | }
136 |
137 |
138 | float distance_ratio = norm / _settings->rage_fov;
139 | float speed_factor = 1.0f + ( 1.0f - distance_ratio );
140 | target_x /= speed_factor;
141 | target_y /= speed_factor;
142 |
143 | if ( screen_pos.x != screen_center_x ) {
144 | target_x = ( screen_pos.x > screen_center_x ) ? -( screen_center_x - screen_pos.x ) : screen_pos.x - screen_center_x;
145 | // target_x /= 0.5f;
146 | target_x = ( target_x + screen_center_x > screen_center_x * 2 || target_x + screen_center_x < 0 ) ? 0 : target_x;
147 | }
148 |
149 | if ( screen_pos.y != 0 ) {
150 | if ( screen_pos.y != screen_center_y ) {
151 | target_y = ( screen_pos.y > screen_center_y ) ? -( screen_center_y - screen_pos.y ) : screen_pos.y - screen_center_y;
152 | // target_y /= 0.5f;
153 | target_y = ( target_y + screen_center_y > screen_center_y * 2 || target_y + screen_center_y < 0 ) ? 0 : target_y;
154 | }
155 | }
156 | mouse_event( MOUSEEVENTF_MOVE, target_x, target_y, NULL, NULL );
157 |
158 | }
159 |
160 | }
161 |
--------------------------------------------------------------------------------
/fhook/hacks/features/ragebot/ragebot.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace unknowncheats {
4 | class rage_t {
5 | public:
6 | void run_aimbot( const c_entity& entity, const c_entity& local, vec3_t local_pos, int ent_idx, int local_idx );
7 |
8 | DWORD aim_position = bone_index::head;
9 | };
10 |
11 | inline const auto _rage = std::make_unique< rage_t >( );
12 | }
--------------------------------------------------------------------------------
/fhook/hacks/features/shots/shots.cpp:
--------------------------------------------------------------------------------
1 | #include "../../../inc.hpp"
2 | #include "shots_hitsound.hpp"
3 | #pragma comment(lib, "Winmm.lib")
4 | #include "../../../sdk/animation_system/animation_system.hpp"
5 |
6 | void unknowncheats::shots_t::hitsound( const c_entity& entity ) {
7 |
8 |
9 | static int prev_total_hits;
10 | int total_hits;
11 | uintptr_t bullet_services;
12 |
13 | _proc_manager.read_memory( entity.player_pawn.address + 0x16B8, bullet_services );
14 | _proc_manager.read_memory( bullet_services + 0x40, total_hits );
15 |
16 | if ( total_hits != prev_total_hits ) {
17 | if ( total_hits == 0 && prev_total_hits != 0 ) { } else {
18 | /*xref
19 | vector < const char* > hitsound = {
20 | "Neverlose",
21 | "Skeet",
22 | "Primordial",
23 | "Sound 1",
24 | "Sound 2",
25 | "Toy duck",
26 | "Bell 1",
27 | "Bell 2",
28 | "Button",
29 | "Pop",
30 | "Wow"
31 | };
32 | */
33 | if ( _settings->hitsound ) {
34 | switch ( _settings->hitsound_type ) {
35 | case 0:
36 | {
37 | PlaySoundA( reinterpret_cast< char* > ( neverlose_sound ), NULL, SND_ASYNC | SND_MEMORY );
38 | } break;
39 | case 1:
40 | {
41 | PlaySoundA( reinterpret_cast< char* > ( skeet_sound ), NULL, SND_ASYNC | SND_MEMORY );
42 | } break;
43 | case 2:
44 | {
45 | PlaySoundA( reinterpret_cast< char* > ( primordial_sound ), NULL, SND_ASYNC | SND_MEMORY );
46 | } break;
47 | case 3:
48 | {
49 | PlaySoundA( reinterpret_cast< char* > ( cock_sound ), NULL, SND_ASYNC | SND_MEMORY );
50 | } break;
51 | case 4:
52 | {
53 | PlaySoundA( reinterpret_cast< char* > ( bepis_sound ), NULL, SND_ASYNC | SND_MEMORY );
54 | } break;
55 | case 5:
56 | {
57 | PlaySoundA( reinterpret_cast< char* > ( ratamac ), NULL, SND_ASYNC | SND_MEMORY );
58 | } break;
59 | case 6:
60 | {
61 | PlaySoundA( reinterpret_cast< char* > ( bell1 ), NULL, SND_ASYNC | SND_MEMORY );
62 | } break;
63 | case 7:
64 | {
65 | PlaySoundA( reinterpret_cast< char* > ( bell2 ), NULL, SND_ASYNC | SND_MEMORY );
66 | } break;
67 | case 8:
68 | {
69 | PlaySoundA( reinterpret_cast< char* > ( button_snd ), NULL, SND_ASYNC | SND_MEMORY );
70 | } break;
71 | case 9:
72 | {
73 | PlaySoundA( reinterpret_cast< char* > ( popsnd ), NULL, SND_ASYNC | SND_MEMORY );
74 | } break;
75 | case 10:
76 | {
77 | PlaySoundA( reinterpret_cast< char* > ( wowsnd ), NULL, SND_ASYNC | SND_MEMORY );
78 | } break;
79 | }
80 | }
81 |
82 | if ( _settings->hitmarker ) {
83 | hitmarker_info info;
84 | info.impacted = true;
85 | info.headshot = false;
86 | this->hitmarkers.push_back( info );
87 | }
88 | }
89 | }
90 | prev_total_hits = total_hits;
91 | }
92 |
93 | void unknowncheats::shots_t::hitmarker( const c_entity& entity, const c_entity& local ) {
94 | if ( !_settings->hitmarker ) {
95 | if ( !this->hitmarkers.empty( ) ) { /* clear these mothercukers */
96 | this->hitmarkers.clear( );
97 | }
98 |
99 | /* do not run multiple times */
100 | return;
101 | }
102 |
103 | if ( local.player_pawn.health <= 0 ) { /* clear these mothercukers */
104 | if ( !this->hitmarkers.empty( ) ) {
105 | this->hitmarkers.clear( );
106 | }
107 |
108 | /* do not run multiple times */
109 | return;
110 | }
111 |
112 | auto center = ImGui::GetIO( ).DisplaySize * 0.5;
113 |
114 | for ( int i = 0; i < this->hitmarkers.size( ); i++ ) {
115 | auto animation = animation_controller.get( "hitmurker" + std::to_string( i ) + animation_controller.current_child );
116 | animation.adjust( animation.value + 3.f * animation_controller.get_min_deltatime( _settings->sound_animation_speed_l ) * ( this->hitmarkers[i].impacted ? 1.f : -1.f ) );
117 |
118 | // unknowncheats::_render->add_line( );
119 | unknowncheats::col_t col = this->hitmarkers[ i ].headshot ? unknowncheats::col_t( 255, 0, 0 ) : _render->to_main_color( _settings->hitmarker_col );
120 |
121 | unknowncheats::_render->add_line( unknowncheats::vec2_t( center.x - 8, center.y - 8 ), unknowncheats::vec2_t( center.x - 4, center.y - 4 ), col.modify_alpha( 255 * animation.value ), 1 );
122 | unknowncheats::_render->add_line( unknowncheats::vec2_t( center.x - 8, center.y + 8 ), unknowncheats::vec2_t( center.x - 4, center.y + 4 ), col.modify_alpha( 255 * animation.value ), 1 );
123 | unknowncheats::_render->add_line( unknowncheats::vec2_t( center.x + 8, center.y - 8 ), unknowncheats::vec2_t( center.x + 4, center.y - 4 ), col.modify_alpha( 255 * animation.value ), 1 );
124 | unknowncheats::_render->add_line( unknowncheats::vec2_t( center.x + 8, center.y + 8 ), unknowncheats::vec2_t( center.x + 4, center.y + 4 ), col.modify_alpha( 255 * animation.value ), 1 );
125 |
126 | if ( animation.value >= 0.99 ) {
127 | this->hitmarkers[ i ].impacted = false;
128 | }
129 |
130 | if ( animation.value <= 0.0f && !this->hitmarkers[ i ].impacted ) {
131 | this->hitmarkers.erase( this->hitmarkers.begin( ) + i );
132 | }
133 | }
134 | #if 0
135 | print_with_data_scoped( std::to_string( this->hitmarkers.size( ) ) )
136 | #endif
137 | }
138 |
--------------------------------------------------------------------------------
/fhook/hacks/features/shots/shots.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace unknowncheats {
4 | // typedef struct _impact_info { /* thanks soufiw */
5 | // float x, y, z;
6 | // float time;
7 | // }impact_info, * p_impact_info;
8 | //
9 | // typedef struct _hitmarker_info { /* thanks soufiw */
10 | // impact_info pImpact;
11 | // float alpha;
12 | // int alpha2;
13 | // int damage;
14 | // float moved;
15 | // }hitmarker_info, * p_hitmarker_info;
16 |
17 | struct hitmarker_info {
18 | bool impacted;
19 | bool headshot;
20 | };
21 |
22 | class shots_t {
23 | public:
24 | void hitsound( const c_entity& entity );
25 | void hitmarker( const c_entity& entity, const c_entity& local );
26 |
27 | //std::vector impacts;
28 | std::vector hitmarkers;
29 | };
30 |
31 | inline const auto _shots = std::make_unique< shots_t >( );
32 | }
--------------------------------------------------------------------------------
/fhook/hacks/features/sound_system/sound.cpp:
--------------------------------------------------------------------------------
1 | #include "../../../inc.hpp"
2 | #include "../../../sdk/animation_system/animation_system.hpp"
3 |
4 | /* rendering stuff gonna sit there */
5 | void render_filled_3d_circle( const unknowncheats::vec3_t& origin, float radius, unknowncheats::col_t color ) {
6 | static constexpr float pi = 3.14159265358979323846f;
7 |
8 | static constexpr float Step = pi * 2.0f / 60;
9 | std::vector points;
10 | for ( float lat = 0.f; lat <= pi * 2.0f; lat += Step ) {
11 | const auto& point3d = unknowncheats::vec3_t( sin( lat ), cos( lat ), 0.f ) * radius;
12 | unknowncheats::vec2_t point2d;
13 | if ( unknowncheats::_address->view.world_to_screen( origin + point3d, point2d ) )
14 | points.push_back( ImVec2( point2d.x, point2d.y ) );
15 | }
16 | ImGui::GetBackgroundDrawList( )->AddConvexPolyFilled( points.data( ), points.size( ), color.convert( ) );
17 | }
18 |
19 | /* rendering stuff gonna sit there */
20 | void render_3d_circle( const unknowncheats::vec3_t& origin, float radius, unknowncheats::col_t color ) {
21 | static constexpr float pi = 3.14159265358979323846f;
22 | static constexpr float Step = pi * 2.0f / 60;
23 |
24 | std::vector points;
25 | for ( float lat = 0.f; lat <= pi * 2.0f; lat += Step ) {
26 | const auto& point3d = unknowncheats::vec3_t( sin( lat ), cos( lat ), 0.f ) * radius;
27 | unknowncheats::vec2_t point2d;
28 | if ( unknowncheats::_address->view.world_to_screen( origin + point3d, point2d ) )
29 | points.push_back( ImVec2( point2d.x, point2d.y ) );
30 | }
31 |
32 | if ( !points.empty( ) ) {
33 | points.push_back( points.front( ) );
34 | ImGui::GetBackgroundDrawList( )->AddPolyline( points.data( ), points.size( ), color.convert( ), false, 1.0f );
35 | }
36 | }
37 |
38 | void unknowncheats::sound_info::push_sound( const c_entity& entity ) {
39 | if ( !_settings->local_sound )
40 | return; /* do not run */
41 |
42 | // game::m_flEmitSoundTime
43 | float smth3; // will we need to iterate?
44 | _proc_manager.read_memory( entity.player_pawn.address + offsets::pawn::emit_sound_time, smth3 );
45 |
46 | static float main = smth3;
47 |
48 | if ( main != smth3 ) {
49 | #if 0
50 | printf( "mem[0]\n" );
51 | #endif
52 | /* should pushback */
53 | this->s_info_l.push_back( sound_info_t{ entity.player_pawn.vec_origin, true } );
54 |
55 | /* reupdate */
56 | main = smth3;
57 | }
58 |
59 | /* draw */
60 | for ( int i = 0; i < this->s_info_l.size( ); i++ ) {
61 | auto animation = animation_controller.get( "soundinfo" + std::to_string( i ) + animation_controller.current_child );
62 | animation.adjust( animation.value + 3.f * animation_controller.get_min_deltatime( _settings->sound_animation_speed_l ) * ( this->s_info_l[i].has_changed ? 1.f : -1.f ) );
63 |
64 | if ( animation.value >= 0.99f )
65 | this->s_info_l[ i ].has_changed = false;
66 |
67 | render_3d_circle( this->s_info_l[ i ].player_origin, _settings->local_range * animation.value, _render->to_main_color( _settings->sound_col_l ) );
68 |
69 | if ( i >= 60 ) {
70 | #if 0
71 | printf( "mem[1]" );
72 | #endif
73 | this->s_info_l.erase( this->s_info_l.begin( ), this->s_info_l.begin( ) + 51 );
74 |
75 | #if 0
76 | print_with_data_scoped( "size: " + std::to_string( this->s_info_l.size( ) ) )
77 | #endif
78 | }
79 | }
80 | }
81 |
82 | void unknowncheats::sound_info::push_sound2( const c_entity& entity, int idx ) { /* use that for enemy */
83 | if ( !_settings->enemy_sound )
84 | return;
85 |
86 | // game::m_flEmitSoundTime
87 | float smth3; // will we need to iterate?
88 | _proc_manager.read_memory( entity.player_pawn.address + offsets::pawn::emit_sound_time, smth3 );
89 |
90 | static float main[ 64 ]{smth3};
91 |
92 | if ( main[idx] != smth3) {
93 | #if 0
94 | printf( "mem[0]\n" );
95 | #endif
96 | /* should pushback */
97 | this->s_info.push_back( sound_info_t{ entity.player_pawn.vec_origin, true } );
98 |
99 | /* reupdate */
100 | main[idx] = smth3;
101 | }
102 |
103 | /* draw */
104 | for ( int i = 0; i < this->s_info.size( ); i++ ) {
105 | auto animation = animation_controller.get( "soundinfo" + std::to_string( i ) + animation_controller.current_child );
106 | animation.adjust( animation.value + 3.f * animation_controller.get_min_deltatime( _settings->sound_animation_speed_e ) * ( this->s_info[ i ].has_changed ? 1.f : -1.f ) );
107 |
108 | if ( animation.value >= 0.99f )
109 | this->s_info[ i ].has_changed = false;
110 |
111 | render_3d_circle( this->s_info[ i ].player_origin, _settings->enemy_range * animation.value, _render->to_main_color( _settings->sound_col_e ) );
112 |
113 | if ( i >= 60 ) {
114 | #if 0
115 | printf( "mem[1]" );
116 | #endif
117 | this->s_info.erase( this->s_info.begin( ), this->s_info.begin( ) + 51 );
118 |
119 | #if 0
120 | print_with_data_scoped( "size: " + std::to_string( this->s_info.size( ) ) )
121 | #endif
122 | }
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/fhook/hacks/features/sound_system/sound.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace unknowncheats {
4 | struct sound_info_t {
5 | vec3_t player_origin;
6 | bool has_changed;
7 | };
8 |
9 | class sound_info {
10 | public:
11 | void push_sound( const c_entity& entity );
12 | void push_sound2( const c_entity& entity, int idx );
13 |
14 | std::vector s_info;
15 | std::vector s_info_l;
16 | };
17 |
18 | inline const auto _sound = std::make_unique< sound_info >( );
19 | }
--------------------------------------------------------------------------------
/fhook/hacks/features/triggerbot/triggerbot.cpp:
--------------------------------------------------------------------------------
1 | #include "../../../inc.hpp"
2 |
3 | /* handlers and stuff */
4 | DWORD ent_handler = 0;
5 | DWORD64 list_avaible_entries = 0;
6 | DWORD64 entry_pawn_address = 0;
7 | unknowncheats::c_entity entity;
8 | bool allow_shot = false;
9 | /* handlers and stuff */
10 |
11 | void release_mouse_event( ) {
12 | /* we can now shot so lets do it */
13 | std::this_thread::sleep_for( std::chrono::milliseconds( unknowncheats::_settings->shot_delay ) ); /* add a custom delay and more */
14 | mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 ); /* release shot event */
15 | }
16 |
17 | void unknowncheats::trigger_t::run_trigger( const unknowncheats::c_entity& local_entity ) {
18 | /* read memory of ent index */
19 | if ( !_proc_manager.read_memory( local_entity.player_pawn.address + offsets::pawn::ent_index, ent_handler ) ) {
20 | #ifdef read_data_dbg
21 | print_with_data_scoped( "trigger_t::run_trigger -> error -> no memory [ 0 ]" );
22 | #endif // read_data_dbg
23 | return;
24 | }
25 |
26 | if ( ent_handler == -1 ) {
27 | #ifdef read_data_dbg_no
28 | print_with_data_scoped( "trigger_t::run_trigger -> error -> idx -1 ( invalid ) [ 1 ]" );
29 | #endif // read_data_dbg
30 | return;
31 | }
32 |
33 | /* store this shit here */
34 | list_avaible_entries = _proc_manager.trace_address( _address->get_entity_list_address( ), { 0x8 * ( ent_handler >> 9 ) + 0x10,0x0 } );
35 | if ( list_avaible_entries == 0 ) {
36 | #ifdef read_data_dbg
37 | print_with_data_scoped( "trigger_t::run_trigger -> error -> idx 0 ( invalid ) [ 2 ]" );
38 | #endif // read_data_dbg
39 | return;
40 | }
41 |
42 | if ( !_proc_manager.read_memory( list_avaible_entries + 0x78 * ( ent_handler & 0x1FF ), entry_pawn_address ) ) {
43 | #ifdef read_data_dbg
44 | print_with_data_scoped( "trigger_t::run_trigger -> error -> no memory [ 3 ]" );
45 | #endif // read_data_dbg
46 | return;
47 | }
48 |
49 | /* update pawn */
50 | if ( !entity.update_pawn( entry_pawn_address ) ) {
51 | #ifdef read_data_dbg_no
52 | print_with_data_scoped( "trigger_t::run_trigger -> error -> pawn::handler_t [ 4 ]" );
53 | #endif // read_data_dbg
54 | return;
55 | }
56 |
57 | /* add team check here */
58 | allow_shot = entity.player_pawn.health > 0;
59 |
60 | if ( !allow_shot ) {
61 | /* we re not gonna log this */
62 | return;
63 | }
64 |
65 |
66 | static std::chrono::time_point last_point = std::chrono::steady_clock::now( );
67 | auto cur_point = std::chrono::steady_clock::now( );
68 | if ( cur_point - last_point >= std::chrono::milliseconds( _settings->reaction_time ) ) {
69 | const bool shooting = GetAsyncKeyState( VK_LBUTTON ) < 0;
70 |
71 | /* run if !shoting */
72 | if ( !shooting ) {
73 | mouse_event( MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 );
74 | std::thread trigger_thread( release_mouse_event );
75 | trigger_thread.detach( );
76 | }
77 |
78 | /* egalize these */
79 | last_point = cur_point;
80 | }
81 | }
82 |
83 | void unknowncheats::trigger_t::run_thread_check( const c_entity& local_entity ) noexcept {
84 | /* here we run thread check and stuff */
85 | }
86 |
--------------------------------------------------------------------------------
/fhook/hacks/features/triggerbot/triggerbot.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace unknowncheats {
4 | class trigger_t {
5 | public:
6 | void run_trigger( const c_entity& local_entity );
7 | void run_thread_check( const c_entity& local_entity ) noexcept;
8 | };
9 |
10 | inline const auto _triggerbot = std::make_unique< trigger_t >( );
11 | }
--------------------------------------------------------------------------------
/fhook/inc.hpp:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #pragma warning ( disable : 4005 )
3 | #pragma warning ( disable : 26495 )
4 | #pragma warning ( disable : 4244 )
5 | #pragma warning ( disable : 4267 )
6 | #pragma warning ( disable : 4715 )
7 | #pragma warning ( disable : 4018 )
8 | #pragma warning ( disable : 4244 )
9 | #pragma warning ( disable : 4305 )
10 |
11 | #include
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include
17 | #include
18 | #include
19 | #include