├── .gitattributes
├── .gitignore
├── README.md
├── config
├── config.cfg
└── offsets.json
├── cs_hack.sln
└── hack
├── aim_assist.cpp
├── aim_assist.h
├── aimbot.cpp
├── aimbot.h
├── axis.cpp
├── axis.h
├── button.h
├── configuration.cpp
├── configuration.h
├── control.cpp
├── control.h
├── entity.cpp
├── entity.h
├── equipment.cpp
├── equipment.h
├── glow.cpp
├── glow.h
├── glow_data.h
├── hack.vcxproj
├── hack.vcxproj.filters
├── includes
└── json.hpp
├── main.cpp
├── memory.cpp
├── memory.h
├── offsets.cpp
├── offsets.h
├── output.cpp
├── output.h
├── parser.cpp
├── parser.h
├── recoil_control.cpp
├── recoil_control.h
├── triggerbot.cpp
├── triggerbot.h
├── utility.h
├── vector.cpp
├── vector.h
├── weapon.cpp
└── weapon.h
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Ww][Ii][Nn]32/
27 | [Aa][Rr][Mm]/
28 | [Aa][Rr][Mm]64/
29 | bld/
30 | [Bb]in/
31 | [Oo]bj/
32 | [Ll]og/
33 | [Ll]ogs/
34 |
35 | # Visual Studio 2015/2017 cache/options directory
36 | .vs/
37 | # Uncomment if you have tasks that create the project's static files in wwwroot
38 | #wwwroot/
39 |
40 | # Visual Studio 2017 auto generated files
41 | Generated\ Files/
42 |
43 | # MSTest test Results
44 | [Tt]est[Rr]esult*/
45 | [Bb]uild[Ll]og.*
46 |
47 | # NUnit
48 | *.VisualState.xml
49 | TestResult.xml
50 | nunit-*.xml
51 |
52 | # Build Results of an ATL Project
53 | [Dd]ebugPS/
54 | [Rr]eleasePS/
55 | dlldata.c
56 |
57 | # Benchmark Results
58 | BenchmarkDotNet.Artifacts/
59 |
60 | # .NET Core
61 | project.lock.json
62 | project.fragment.lock.json
63 | artifacts/
64 |
65 | # ASP.NET Scaffolding
66 | ScaffoldingReadMe.txt
67 |
68 | # StyleCop
69 | StyleCopReport.xml
70 |
71 | # Files built by Visual Studio
72 | *_i.c
73 | *_p.c
74 | *_h.h
75 | *.ilk
76 | *.meta
77 | *.obj
78 | *.iobj
79 | *.pch
80 | *.pdb
81 | *.ipdb
82 | *.pgc
83 | *.pgd
84 | *.rsp
85 | *.sbr
86 | *.tlb
87 | *.tli
88 | *.tlh
89 | *.tmp
90 | *.tmp_proj
91 | *_wpftmp.csproj
92 | *.log
93 | *.tlog
94 | *.vspscc
95 | *.vssscc
96 | .builds
97 | *.pidb
98 | *.svclog
99 | *.scc
100 |
101 | # Chutzpah Test files
102 | _Chutzpah*
103 |
104 | # Visual C++ cache files
105 | ipch/
106 | *.aps
107 | *.ncb
108 | *.opendb
109 | *.opensdf
110 | *.sdf
111 | *.cachefile
112 | *.VC.db
113 | *.VC.VC.opendb
114 |
115 | # Visual Studio profiler
116 | *.psess
117 | *.vsp
118 | *.vspx
119 | *.sap
120 |
121 | # Visual Studio Trace Files
122 | *.e2e
123 |
124 | # TFS 2012 Local Workspace
125 | $tf/
126 |
127 | # Guidance Automation Toolkit
128 | *.gpState
129 |
130 | # ReSharper is a .NET coding add-in
131 | _ReSharper*/
132 | *.[Rr]e[Ss]harper
133 | *.DotSettings.user
134 |
135 | # TeamCity is a build add-in
136 | _TeamCity*
137 |
138 | # DotCover is a Code Coverage Tool
139 | *.dotCover
140 |
141 | # AxoCover is a Code Coverage Tool
142 | .axoCover/*
143 | !.axoCover/settings.json
144 |
145 | # Coverlet is a free, cross platform Code Coverage Tool
146 | coverage*.json
147 | coverage*.xml
148 | coverage*.info
149 |
150 | # Visual Studio code coverage results
151 | *.coverage
152 | *.coveragexml
153 |
154 | # NCrunch
155 | _NCrunch_*
156 | .*crunch*.local.xml
157 | nCrunchTemp_*
158 |
159 | # MightyMoose
160 | *.mm.*
161 | AutoTest.Net/
162 |
163 | # Web workbench (sass)
164 | .sass-cache/
165 |
166 | # Installshield output folder
167 | [Ee]xpress/
168 |
169 | # DocProject is a documentation generator add-in
170 | DocProject/buildhelp/
171 | DocProject/Help/*.HxT
172 | DocProject/Help/*.HxC
173 | DocProject/Help/*.hhc
174 | DocProject/Help/*.hhk
175 | DocProject/Help/*.hhp
176 | DocProject/Help/Html2
177 | DocProject/Help/html
178 |
179 | # Click-Once directory
180 | publish/
181 |
182 | # Publish Web Output
183 | *.[Pp]ublish.xml
184 | *.azurePubxml
185 | # Note: Comment the next line if you want to checkin your web deploy settings,
186 | # but database connection strings (with potential passwords) will be unencrypted
187 | *.pubxml
188 | *.publishproj
189 |
190 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
191 | # checkin your Azure Web App publish settings, but sensitive information contained
192 | # in these scripts will be unencrypted
193 | PublishScripts/
194 |
195 | # NuGet Packages
196 | *.nupkg
197 | # NuGet Symbol Packages
198 | *.snupkg
199 | # The packages folder can be ignored because of Package Restore
200 | **/[Pp]ackages/*
201 | # except build/, which is used as an MSBuild target.
202 | !**/[Pp]ackages/build/
203 | # Uncomment if necessary however generally it will be regenerated when needed
204 | #!**/[Pp]ackages/repositories.config
205 | # NuGet v3's project.json files produces more ignorable files
206 | *.nuget.props
207 | *.nuget.targets
208 |
209 | # Microsoft Azure Build Output
210 | csx/
211 | *.build.csdef
212 |
213 | # Microsoft Azure Emulator
214 | ecf/
215 | rcf/
216 |
217 | # Windows Store app package directories and files
218 | AppPackages/
219 | BundleArtifacts/
220 | Package.StoreAssociation.xml
221 | _pkginfo.txt
222 | *.appx
223 | *.appxbundle
224 | *.appxupload
225 |
226 | # Visual Studio cache files
227 | # files ending in .cache can be ignored
228 | *.[Cc]ache
229 | # but keep track of directories ending in .cache
230 | !?*.[Cc]ache/
231 |
232 | # Others
233 | ClientBin/
234 | ~$*
235 | *~
236 | *.dbmdl
237 | *.dbproj.schemaview
238 | *.jfm
239 | *.pfx
240 | *.publishsettings
241 | orleans.codegen.cs
242 |
243 | # Including strong name files can present a security risk
244 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
245 | #*.snk
246 |
247 | # Since there are multiple workflows, uncomment next line to ignore bower_components
248 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
249 | #bower_components/
250 |
251 | # RIA/Silverlight projects
252 | Generated_Code/
253 |
254 | # Backup & report files from converting an old project file
255 | # to a newer Visual Studio version. Backup files are not needed,
256 | # because we have git ;-)
257 | _UpgradeReport_Files/
258 | Backup*/
259 | UpgradeLog*.XML
260 | UpgradeLog*.htm
261 | ServiceFabricBackup/
262 | *.rptproj.bak
263 |
264 | # SQL Server files
265 | *.mdf
266 | *.ldf
267 | *.ndf
268 |
269 | # Business Intelligence projects
270 | *.rdl.data
271 | *.bim.layout
272 | *.bim_*.settings
273 | *.rptproj.rsuser
274 | *- [Bb]ackup.rdl
275 | *- [Bb]ackup ([0-9]).rdl
276 | *- [Bb]ackup ([0-9][0-9]).rdl
277 |
278 | # Microsoft Fakes
279 | FakesAssemblies/
280 |
281 | # GhostDoc plugin setting file
282 | *.GhostDoc.xml
283 |
284 | # Node.js Tools for Visual Studio
285 | .ntvs_analysis.dat
286 | node_modules/
287 |
288 | # Visual Studio 6 build log
289 | *.plg
290 |
291 | # Visual Studio 6 workspace options file
292 | *.opt
293 |
294 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
295 | *.vbw
296 |
297 | # Visual Studio 6 auto-generated project file (contains which files were open etc.)
298 | *.vbp
299 |
300 | # Visual Studio 6 workspace and project file (working project files containing files to include in project)
301 | *.dsw
302 | *.dsp
303 |
304 | # Visual Studio 6 technical files
305 | *.ncb
306 | *.aps
307 |
308 | # Visual Studio LightSwitch build output
309 | **/*.HTMLClient/GeneratedArtifacts
310 | **/*.DesktopClient/GeneratedArtifacts
311 | **/*.DesktopClient/ModelManifest.xml
312 | **/*.Server/GeneratedArtifacts
313 | **/*.Server/ModelManifest.xml
314 | _Pvt_Extensions
315 |
316 | # Paket dependency manager
317 | .paket/paket.exe
318 | paket-files/
319 |
320 | # FAKE - F# Make
321 | .fake/
322 |
323 | # CodeRush personal settings
324 | .cr/personal
325 |
326 | # Python Tools for Visual Studio (PTVS)
327 | __pycache__/
328 | *.pyc
329 |
330 | # Cake - Uncomment if you are using it
331 | # tools/**
332 | # !tools/packages.config
333 |
334 | # Tabs Studio
335 | *.tss
336 |
337 | # Telerik's JustMock configuration file
338 | *.jmconfig
339 |
340 | # BizTalk build output
341 | *.btp.cs
342 | *.btm.cs
343 | *.odx.cs
344 | *.xsd.cs
345 |
346 | # OpenCover UI analysis results
347 | OpenCover/
348 |
349 | # Azure Stream Analytics local run output
350 | ASALocalRun/
351 |
352 | # MSBuild Binary and Structured Log
353 | *.binlog
354 |
355 | # NVidia Nsight GPU debugger configuration file
356 | *.nvuser
357 |
358 | # MFractors (Xamarin productivity tool) working folder
359 | .mfractor/
360 |
361 | # Local History for Visual Studio
362 | .localhistory/
363 |
364 | # Visual Studio History (VSHistory) files
365 | .vshistory/
366 |
367 | # BeatPulse healthcheck temp database
368 | healthchecksdb
369 |
370 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
371 | MigrationBackup/
372 |
373 | # Ionide (cross platform F# VS Code tools) working folder
374 | .ionide/
375 |
376 | # Fody - auto-generated XML schema
377 | FodyWeavers.xsd
378 |
379 | # VS Code files for those working on multiple tools
380 | .vscode/*
381 | !.vscode/settings.json
382 | !.vscode/tasks.json
383 | !.vscode/launch.json
384 | !.vscode/extensions.json
385 | *.code-workspace
386 |
387 | # Local History for Visual Studio Code
388 | .history/
389 |
390 | # Windows Installer files from build outputs
391 | *.cab
392 | *.msi
393 | *.msix
394 | *.msm
395 | *.msp
396 |
397 | # JetBrains Rider
398 | *.sln.iml
399 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Internal CS:GO Cheat
2 |
3 | ## Overview
4 |
5 | Human-like aim assist, developed and maintained between 2016 and 2020 for a small circle of friends. Using it today would probably damage one's trust factor, if it were still private. It's config only, no menu.
6 |
7 | Here is a [showcase video](https://www.youtube.com/watch?v=wSdxXN6IHc0) of the aim assist with various weapons.
8 |
9 | Uses nlohmann's [JSON library](https://github.com/nlohmann/json) and offset files generated with frk1's [hazedumper](https://github.com/frk1/hazedumper).
10 | Structs, class IDs, etc. were mostly found on the [UC Wiki](https://www.unknowncheats.me/wiki/UnKnoWnCheaTs_Game_Hacking_Wiki).
11 |
12 | The program requires [config.cfg](config/config.cfg) and [offsets.json](config/offsets.json) to be located in the directory _%userprofile%/Documents/Anda/_. The offsets need continuous updating.
13 |
14 |
15 | ## Configuration Syntax Settings
16 |
17 | The config allows general, weapon and weapon-class specific settings. To apply a setting to one weapon (or group), insert the weapon expression in front of the option. If no weapon is specified, the setting is applied globally. The more specific a setting is, the higher is its priority. Variant settings allow playing with different settings while holding a defined key. The default config mainly utilizes _Mouse 5 (MB2)_ for features that require holding a button.
18 |
19 |
20 | #### Priority Order
21 |
22 | Example: Every weapon's tracking speed is set to 0.10. This value is overwritten for assault rifles (0.35). When using the AK47 and holding the ALT key, the value is overwritten with 0.60.
23 |
24 | ```
25 | AimAssist::TrackingSpeed 0.10
26 | ASSAULT_RIFLE AimAssist::TrackingSpeed 0.35
27 | AK47 VARIANT_KEY ALT AimAssist::TrackingSpeed 0.60
28 | ```
29 |
30 | #### Expressions
31 |
32 | Weapon expressions can be found in [weapon.cpp](hack/weapon.h) and key expressions in [parser.cpp](hack/parser.cpp).
33 | Alternatively keys can be assigned with hexadecimal key codes as listed [here](https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes).
34 |
35 | Example of the same expression:
36 | ```
37 | SNIPER_RIFLE TriggerBot_Key ALT
38 | SNIPER_RIFLE TriggerBot_Key 0x12
39 | ```
40 |
41 | #### Configuration Datatypes
42 |
43 | | Datatype | Description | Example |
44 | | --- | --- | --- |
45 | | INT | Integer Value | 0, 1, 2, 1337, ... |
46 | | FLOAT | Decimal Value | 0.1, 1.1, 1.337, 3.14159, ... |
47 | | BOOL | Truth Value | 0 or 1 |
48 | | HEX | Hexadecimal Keycode | 0x01, 0x02, 0x0F, ... |
49 | | STR | Character Sequence | "LMB", "ENTER", "INSERT", ... |
50 | | RGBA | Color (R, G, B, a) | "0xffff00ff" (yellow at 100% alpha), ... |
51 |
52 |
53 | ### General Settings
54 |
55 |
56 | LoadConfigKey [STR or HEX]
57 | Key to reload the config. Changes made to config.cfg can be applied in-game. An audio signal will confirm that the config has been loaded. Invalid settings can make the game crash as there is no error handling. Reloading the config resets temporary changes like a disabled feature.
58 |
59 | PanicKey [STR or HEX]
60 | Exits the game without any further confirmation.
61 |
62 | SyncBreak [INT]
63 | Pause between each iteration in milliseconds. Some features do not get updated permanently to enhance the performance. The optimal setting is machine specific.
64 |
65 | ActivateConsole [BOOL]
66 | The console shows if the config and offset files have been loaded.
67 |
68 | HideConsoleAfterStartup [BOOL]
69 | Hides the console five seconds after injection.
70 |
71 |
72 |
73 | ### Shared Settings
74 |
75 |
76 | On [BOOL]
77 | Enables or disables the feature it is used on.
78 |
79 | Key [STR or HEX]
80 | Determines which key is used to activate the feature. Valid arguments are either the predefined strings in parser.cpp or the hexadecimal key codes for Windows key events.
81 |
82 | HoldKey [BOOL]
83 | Boolean value defining whether pressing the key toggles the feature or if the key must be held down.
84 |
85 | PlaySound [BOOL]
86 | Plays a beep sound when the feature is activated (high pitch) or deactivated (low pitch) if set to 1.
87 |
88 |
89 |
90 | ### Aim Assist Settings
91 |
92 |
93 | FieldOfViewType [INT]
94 | Set to degree [0] or Source Engine units [1] (dynamic FOV). Determines how the field of view is measured. A dynamic field of view gets smaller for entities far away. A player model in CS:GO is about 70 Source Engine units high: Using a dynamic FOV with 70 units for example activates the aim assist within a diameter of the target's height, regardless of its distance.
95 |
96 | FieldOfView [FLOAT]
97 | Field of view of the aim assist.
98 |
99 | TrackingSpeed [FLOAT]
100 | Value between 0.0 and 1.0 defining the converging velocity when resting. A small value provides slow tracking when not shooting. Very high values make the tracking seem unnatural, especially on moving targets. Setting this value to 0.0 disables tracking when not shooting.
101 |
102 | TrackingSpeedFire [FLOAT]
103 | Value between 0.0 and 1.0 defining the converging velocity when shooting. Values are recommended to be higher than for the resting TrackingSpeed as more aim compensation is needed while firing due to recoil.
104 |
105 | CurbZone [FLOAT]
106 | Factor to set a range in which the tracking is decelerated (hit box size reference). Determines the zone inside which the tracking speed is decreased to not lock on the target but track it smoothly. Setting this value to 1.0 will start the deceleration on the edge of the hitbox. Setting it to 2.0 will start the deceleration within a radius of two hitboxes, and so on.
107 |
108 | Punch [FLOAT]
109 | Value between 0.0 and 1.0 that determines the amount of recoil being compensated. A value of 0.0 will not compensate any recoil, a value of 1.0 will compensate the full amount of recoil if the tracking speed is high enough to follow the spraying pattern.
110 |
111 | DistanceReduction [FLOAT]
112 | Factor that reduces tracking speed for afar targets. A value of 1.0 will slow and soften the tracking for targets according to their distance to the local player. Setting the factor to zero will keep the tracking speed high to allow strong recoil compensation on long range.
113 |
114 | MaximumVelocity [FLOAT]
115 | Maximum permitted velocity of the local player until the aim assist is active. Moving faster deactivates the aim assist (completely or partly, see LinearVelocityMapping ). The moving velocity with a knife is 250.0 Source Engine units per second. The feature can be disabled by setting it to 300.0 or higher.
116 |
117 | LinearVelocityMapping [BOOL]
118 | Linearly reduces the tracking speed until MaximumVelocity is reached. Allows maximum tracking strength when standing still with a linear drop-off. The feature can be disabled by setting it to 0.
119 |
120 | ForceHeadshot [BOOL]
121 | Exclusively converge to a target's head. Otherwise selects the closest bone to the crosshair.
122 |
123 | ForceBodyAfterShots [INT]
124 | Number of shots fired after which the aim assist will exclusively target the chest. This feature neglects ForceHeadshot and can be used to increase hit chance on long range after initially converging to the head.
125 |
126 | JumpDelay [INT]
127 | Reaction time to track a jumping target (milliseconds). Value that determines the aim assist's tracking delay when a target jumps.
128 |
129 | CrouchDelay [INT]
130 | Reaction time to track a crouching target (milliseconds). Value that determines the aim assist's tracking delay when a target crouches.
131 |
132 | MovementPrediction [INT]
133 | Shifts the target's coordinates to its predicted position in a definable amount of time (milliseconds). Because there is no bullet speed in CS, this feature has no practical use, unless the tracking speed is set to a low value.
134 |
135 | TransferPause [INT]
136 | Pause between switching targets after a kill while spraying (milliseconds). Allows a smooth transition to the next target.
137 |
138 | FirePause [INT]
139 | Time of deactivation after the last bullet (milliseconds). Pauses the aim assist after shooting to make the tracking look more human.
140 |
141 | PauseRangeExtensionFactor [FLOAT]
142 | Time added to FirePause : t = t_firepause + range_factor * distance / Source Engine units. Increases the pause after firing a shot at afar targets.
143 |
144 | SpotDelay [INT]
145 | Activation delay after the target is spotted for the first time (milliseconds).
146 |
147 | ActivationSoftening [INT]
148 | Softening duration after the aim assist is activated with a key event.
149 |
150 |
151 |
152 | ### Triggerbot Settings
153 |
154 |
155 | KeySpraydown [STR or HEX]
156 | Determines a key that triggers a long burst instead of a classic triggerbot shooting pattern. This feature is intended to be used together with the aim assist when holding an angle against a close-range target with automatic weapons.
157 |
158 | Mode [INT]
159 | Set to incross [0], hitbox [1] or both combined (OR) [2]. The incross triggerbot uses a Source Engine function to check if a target is behind the player's crosshair and works reliably in most situations, but not always (for example when aiming through smoke). The hitbox triggerbot scans for the target's hitbox and can be used to shoot at targets behind objects if VisibilityCheck is turned off. The combined option uses both methods at the same time.
160 |
161 | PauseAfterShot [INT]
162 | Time before the next shot can be triggered (milliseconds).
163 |
164 | PauseRangeExtensionFactor [FLOAT]
165 | Extends the standard pause with increasing distance to the target (milliseconds per unit) to make the triggerbot shoot with lower frequency on long-range if greater than 0.0. Time added to PauseAfterShot : t = t_pause + range_factor * distance / Source Engine units.
166 |
167 | FakeShotDuration [INT]
168 | Time after a kill during which shots are still triggered (milliseconds). Determines whether the previous target has died and keeps shooting during the defined timespan.
169 |
170 | FireExtension [INT]
171 | Applies only for spraydowns: Minimum duration (milliseconds) of activation after a contact. Results in shots being fired even after leaving the target, depending on the weapon's RPM and the duration defined.
172 |
173 | MaximumDistance [FLOAT]
174 | Distance between local player and target required to trigger (Source Engine units).
175 |
176 | MaximumVelocity [FLOAT]
177 | Maximum permitted velocity of the local player until the triggerbot is active. The moving velocity with a knife is 250.0 Source Engine units per second. The feature can be disabled by setting it to 300.0 or higher.
178 |
179 | DisableWhileEnteringScope [BOOL]
180 | Turns the triggerbot off while changing to the scope.
181 |
182 | EnableInScopeOnly [BOOL]
183 | Disables the triggerbot when not scoped in.
184 |
185 | HeadOnly [BOOL]
186 | Reacts to heads only.
187 |
188 | FriendlyFire [BOOL]
189 | Enables the triggerbot for teammates.
190 |
191 | VisibilityCheck [BOOL]
192 | Checks if a target is visible.
193 |
194 |
195 | ### Wallhack / Glow Settings
196 |
197 |
198 | ToggleForAllWeapons [BOOL]
199 | Allows to apply toggling to all [1] or a single weapon [0].
200 |
201 | SpottedOnly [BOOL]
202 | Enables the glow only for already spotted targets.
203 |
204 | DistinctColors [BOOL]
205 | Enables different glow colors for each target. The colors can be defined using RGBA_DistinctColors .
206 |
207 | DistinctMixFactor [FLOAT]
208 | Value between 0.0 and 1.0 that is the weight of RGBA_Hostile1HP for the health dependent glow color determination.
209 |
210 | RGBA_Color [RGBA]
211 | Glow color of an object.
212 |
213 | RGBA_DistinctColors [RGBA]
214 | List of colors to use for the DistinctColors feature.
215 |
216 |
217 | ### Aimbot Settings
218 |
219 |
220 | FieldOfView [FLOAT]
221 | Field of view of the aimbot.
222 |
223 | SingleShot [BOOL]
224 | Fires one shot once a target has been locked on. Allows to one-tap targets by turning on FireShotIfNoTargetFound , turning off visibility checks and binding all features to one button, for example RMB.
225 |
226 | FireShotIfNoTargetFound [BOOL]
227 | Fires one shot, even if no target has been found.
228 |
229 | VisibilityCheck [BOOL]
230 | Checks if a target is visible.
231 |
232 | FriendlyFire [BOOL]
233 | Enables the aimbot for teammates.
234 |
235 |
236 | ### Recoil Control System Settings
237 |
238 |
239 | ReductionFactor [FLOAT]
240 | Value between 0.0 and 1.0, determining the strength of the compensation.
241 |
242 | SyncPause [INT]
243 | Pause between each iteration in milliseconds. The regular SyncBreak doesn't fully apply for the RCS.
244 |
245 |
--------------------------------------------------------------------------------
/config/config.cfg:
--------------------------------------------------------------------------------
1 | # DEFAULT CONFIGURATION FILE FOR ANDA'S CS:GO CHEAT
2 |
3 | LoadConfigKey INSERT
4 | PanicKey END
5 | SyncBreak 3
6 | ActivateConsole 1
7 | HideConsoleAfterStartup 0
8 |
9 | # ____________________________________________________________
10 | #
11 | # AIM ASSIST
12 | #
13 | # ------------------------------------------------------------
14 |
15 | ASSAULT_RIFLE AimAssist::On 1
16 | ASSAULT_RIFLE AimAssist::Key F5
17 | ASSAULT_RIFLE AimAssist::HoldKey 0
18 | ASSAULT_RIFLE AimAssist::PlaySound 1
19 | ASSAULT_RIFLE AimAssist::FieldOfViewType 0
20 | ASSAULT_RIFLE AimAssist::FieldOfView 20.0
21 | ASSAULT_RIFLE AimAssist::TrackingSpeed 0.15
22 | ASSAULT_RIFLE AimAssist::TrackingSpeedFire 0.60
23 | ASSAULT_RIFLE AimAssist::CurbZone 3.0
24 | ASSAULT_RIFLE AimAssist::Punch 1.0
25 | ASSAULT_RIFLE AimAssist::DistanceReduction 0.50
26 | ASSAULT_RIFLE AimAssist::MaximumVelocity 500.0
27 | ASSAULT_RIFLE AimAssist::LinearVelocityMapping 0
28 | ASSAULT_RIFLE AimAssist::VisibilityCheck 1
29 | ASSAULT_RIFLE AimAssist::FriendlyFire 0
30 | ASSAULT_RIFLE AimAssist::ForceHeadshot 1
31 | ASSAULT_RIFLE AimAssist::ForceBodyAfterShots 2
32 | ASSAULT_RIFLE AimAssist::JumpDelay 200
33 | ASSAULT_RIFLE AimAssist::CrouchDelay 200
34 | ASSAULT_RIFLE AimAssist::MovementPrediction 0
35 | ASSAULT_RIFLE AimAssist::TransferPause 150
36 | ASSAULT_RIFLE AimAssist::FirePause 100
37 | ASSAULT_RIFLE AimAssist::PauseRangeExtensionFactor 0.40
38 | ASSAULT_RIFLE AimAssist::SpotDelay 50
39 | ASSAULT_RIFLE AimAssist::ActivationSoftening 200
40 |
41 | ASSAULT_RIFLE VARIANT_KEY MB2 Variant::HoldKey 1
42 | ASSAULT_RIFLE VARIANT_KEY MB2 Variant::PlaySound 0
43 | ASSAULT_RIFLE VARIANT_KEY MB2 AimAssist::TrackingSpeed 0.60
44 | ASSAULT_RIFLE VARIANT_KEY MB2 AimAssist::TrackingSpeedFire 0.60
45 | ASSAULT_RIFLE VARIANT_KEY MB2 AimAssist::DistanceReduction 0.0
46 |
47 | SNIPER_RIFLE AimAssist::On 1
48 | SNIPER_RIFLE AimAssist::Key MB2
49 | SNIPER_RIFLE AimAssist::HoldKey 1
50 | SNIPER_RIFLE AimAssist::PlaySound 0
51 | SNIPER_RIFLE AimAssist::FieldOfViewType 0
52 | SNIPER_RIFLE AimAssist::FieldOfView 10.0
53 | SNIPER_RIFLE AimAssist::TrackingSpeed 0.70
54 | SNIPER_RIFLE AimAssist::TrackingSpeedFire 0.0
55 | SNIPER_RIFLE AimAssist::CurbZone 3.0
56 | SNIPER_RIFLE AimAssist::Punch 0.0
57 | SNIPER_RIFLE AimAssist::DistanceReduction 1.0
58 | SNIPER_RIFLE AimAssist::MaximumVelocity 300.0
59 | SNIPER_RIFLE AimAssist::LinearVelocityMapping 0
60 | SNIPER_RIFLE AimAssist::VisibilityCheck 1
61 | SNIPER_RIFLE AimAssist::FriendlyFire 0
62 | SNIPER_RIFLE AimAssist::ForceHeadshot 0
63 | SNIPER_RIFLE AimAssist::ForceBodyAfterShots 15
64 | SNIPER_RIFLE AimAssist::JumpDelay 300
65 | SNIPER_RIFLE AimAssist::CrouchDelay 300
66 | SNIPER_RIFLE AimAssist::MovementPrediction 0
67 | SNIPER_RIFLE AimAssist::TransferPause 500
68 | SNIPER_RIFLE AimAssist::FirePause 500
69 | SNIPER_RIFLE AimAssist::PauseRangeExtensionFactor 0.10
70 | SNIPER_RIFLE AimAssist::SpotDelay 50
71 | SNIPER_RIFLE AimAssist::ActivationSoftening 100
72 |
73 | SNIPER_RIFLE VARIANT_KEY UP_ARROW Variant::HoldKey 0
74 | SNIPER_RIFLE VARIANT_KEY UP_ARROW Variant::PlaySound 1
75 | SNIPER_RIFLE VARIANT_KEY UP_ARROW AimAssist::HoldKey 0
76 | SNIPER_RIFLE VARIANT_KEY UP_ARROW AimAssist::TrackingSpeed 0.40
77 | SNIPER_RIFLE VARIANT_KEY UP_ARROW AimAssist::FieldOfView 10.0
78 |
79 | PISTOL AimAssist::On 1
80 | PISTOL AimAssist::Key MB2
81 | PISTOL AimAssist::HoldKey 1
82 | PISTOL AimAssist::PlaySound 0
83 | PISTOL AimAssist::FieldOfViewType 0
84 | PISTOL AimAssist::FieldOfView 20.0
85 | PISTOL AimAssist::TrackingSpeed 0.40
86 | PISTOL AimAssist::TrackingSpeedFire 0.40
87 | PISTOL AimAssist::CurbZone 3.0
88 | PISTOL AimAssist::Punch 1.0
89 | PISTOL AimAssist::DistanceReduction 1.0
90 | PISTOL AimAssist::MaximumVelocity 700.0
91 | PISTOL AimAssist::LinearVelocityMapping 1
92 | PISTOL AimAssist::VisibilityCheck 1
93 | PISTOL AimAssist::FriendlyFire 0
94 | PISTOL AimAssist::ForceHeadshot 1
95 | PISTOL AimAssist::ForceBodyAfterShots 15
96 | PISTOL AimAssist::JumpDelay 500
97 | PISTOL AimAssist::CrouchDelay 500
98 | PISTOL AimAssist::MovementPrediction 20
99 | PISTOL AimAssist::TransferPause 300
100 | PISTOL AimAssist::FirePause 0
101 | PISTOL AimAssist::PauseRangeExtensionFactor 0.20
102 | PISTOL AimAssist::SpotDelay 100
103 | PISTOL AimAssist::ActivationSoftening 100
104 |
105 | PISTOL VARIANT_KEY UP_ARROW Variant::HoldKey 0
106 | PISTOL VARIANT_KEY UP_ARROW Variant::PlaySound 1
107 | PISTOL VARIANT_KEY UP_ARROW AimAssist::HoldKey 0
108 |
109 | DEAGLE AimAssist::On 1
110 | DEAGLE AimAssist::Key MB2
111 | DEAGLE AimAssist::HoldKey 1
112 | DEAGLE AimAssist::PlaySound 0
113 | DEAGLE AimAssist::FieldOfViewType 0
114 | DEAGLE AimAssist::FieldOfView 20.0
115 | DEAGLE AimAssist::TrackingSpeed 0.40
116 | DEAGLE AimAssist::TrackingSpeedFire 0.40
117 | DEAGLE AimAssist::CurbZone 3.0
118 | DEAGLE AimAssist::Punch 1.0
119 | DEAGLE AimAssist::DistanceReduction 1.0
120 | DEAGLE AimAssist::MaximumVelocity 300.0
121 | DEAGLE AimAssist::LinearVelocityMapping 0
122 | DEAGLE AimAssist::VisibilityCheck 1
123 | DEAGLE AimAssist::FriendlyFire 0
124 | DEAGLE AimAssist::ForceHeadshot 1
125 | DEAGLE AimAssist::ForceBodyAfterShots 15
126 | DEAGLE AimAssist::JumpDelay 100
127 | DEAGLE AimAssist::CrouchDelay 100
128 | DEAGLE AimAssist::MovementPrediction 0
129 | DEAGLE AimAssist::TransferPause 500
130 | DEAGLE AimAssist::FirePause 400
131 | DEAGLE AimAssist::PauseRangeExtensionFactor 0.70
132 | DEAGLE AimAssist::SpotDelay 50
133 | DEAGLE AimAssist::ActivationSoftening 100
134 |
135 | SUBMACHINE_GUN AimAssist::On 1
136 | SUBMACHINE_GUN AimAssist::Key F5
137 | SUBMACHINE_GUN AimAssist::HoldKey 0
138 | SUBMACHINE_GUN AimAssist::PlaySound 1
139 | SUBMACHINE_GUN AimAssist::FieldOfViewType 0
140 | SUBMACHINE_GUN AimAssist::FieldOfView 20.0
141 | SUBMACHINE_GUN AimAssist::TrackingSpeed 0.15
142 | SUBMACHINE_GUN AimAssist::TrackingSpeedFire 0.50
143 | SUBMACHINE_GUN AimAssist::CurbZone 3.0
144 | SUBMACHINE_GUN AimAssist::Punch 1.0
145 | SUBMACHINE_GUN AimAssist::DistanceReduction 1.0
146 | SUBMACHINE_GUN AimAssist::MaximumVelocity 500.0
147 | SUBMACHINE_GUN AimAssist::LinearVelocityMapping 1
148 | SUBMACHINE_GUN AimAssist::VisibilityCheck 1
149 | SUBMACHINE_GUN AimAssist::FriendlyFire 0
150 | SUBMACHINE_GUN AimAssist::ForceHeadshot 0
151 | SUBMACHINE_GUN AimAssist::ForceBodyAfterShots 10
152 | SUBMACHINE_GUN AimAssist::JumpDelay 300
153 | SUBMACHINE_GUN AimAssist::CrouchDelay 300
154 | SUBMACHINE_GUN AimAssist::MovementPrediction 0
155 | SUBMACHINE_GUN AimAssist::TransferPause 300
156 | SUBMACHINE_GUN AimAssist::FirePause 0
157 | SUBMACHINE_GUN AimAssist::PauseRangeExtensionFactor 0.0
158 | SUBMACHINE_GUN AimAssist::SpotDelay 200
159 | SUBMACHINE_GUN AimAssist::ActivationSoftening 200
160 |
161 | MACHINE_GUN AimAssist::On 1
162 | MACHINE_GUN AimAssist::Key F5
163 | MACHINE_GUN AimAssist::HoldKey 0
164 | MACHINE_GUN AimAssist::PlaySound 1
165 | MACHINE_GUN AimAssist::FieldOfViewType 0
166 | MACHINE_GUN AimAssist::FieldOfView 20.0
167 | MACHINE_GUN AimAssist::TrackingSpeed 0.0
168 | MACHINE_GUN AimAssist::TrackingSpeedFire 0.40
169 | MACHINE_GUN AimAssist::CurbZone 3.0
170 | MACHINE_GUN AimAssist::Punch 1.0
171 | MACHINE_GUN AimAssist::DistanceReduction 1.0
172 | MACHINE_GUN AimAssist::MaximumVelocity 500.0
173 | MACHINE_GUN AimAssist::LinearVelocityMapping 1
174 | MACHINE_GUN AimAssist::VisibilityCheck 1
175 | MACHINE_GUN AimAssist::FriendlyFire 0
176 | MACHINE_GUN AimAssist::ForceHeadshot 0
177 | MACHINE_GUN AimAssist::ForceBodyAfterShots 10
178 | MACHINE_GUN AimAssist::JumpDelay 300
179 | MACHINE_GUN AimAssist::CrouchDelay 300
180 | MACHINE_GUN AimAssist::MovementPrediction 0
181 | MACHINE_GUN AimAssist::TransferPause 300
182 | MACHINE_GUN AimAssist::FirePause 0
183 | MACHINE_GUN AimAssist::PauseRangeExtensionFactor 0.0
184 | MACHINE_GUN AimAssist::SpotDelay 200
185 | MACHINE_GUN AimAssist::ActivationSoftening 200
186 |
187 | SHOTGUN AimAssist::On 1
188 | SHOTGUN AimAssist::Key MB2
189 | SHOTGUN AimAssist::HoldKey 1
190 | SHOTGUN AimAssist::PlaySound 0
191 | SHOTGUN AimAssist::FieldOfViewType 0
192 | SHOTGUN AimAssist::FieldOfView 20.0
193 | SHOTGUN AimAssist::TrackingSpeed 0.0
194 | SHOTGUN AimAssist::TrackingSpeedFire 0.40
195 | SHOTGUN AimAssist::CurbZone 3.0
196 | SHOTGUN AimAssist::Punch 0.50
197 | SHOTGUN AimAssist::DistanceReduction 1.0
198 | SHOTGUN AimAssist::MaximumVelocity 500.0
199 | SHOTGUN AimAssist::LinearVelocityMapping 1
200 | SHOTGUN AimAssist::VisibilityCheck 1
201 | SHOTGUN AimAssist::FriendlyFire 0
202 | SHOTGUN AimAssist::ForceHeadshot 1
203 | SHOTGUN AimAssist::ForceBodyAfterShots 15
204 | SHOTGUN AimAssist::JumpDelay 300
205 | SHOTGUN AimAssist::CrouchDelay 300
206 | SHOTGUN AimAssist::MovementPrediction 0
207 | SHOTGUN AimAssist::TransferPause 300
208 | SHOTGUN AimAssist::FirePause 500
209 | SHOTGUN AimAssist::PauseRangeExtensionFactor 0.30
210 | SHOTGUN AimAssist::SpotDelay 200
211 | SHOTGUN AimAssist::ActivationSoftening 200
212 |
213 | # ____________________________________________________________
214 | #
215 | # TRIGGER BOT
216 | #
217 | # ------------------------------------------------------------
218 |
219 | ASSAULT_RIFLE Triggerbot::On 1
220 | ASSAULT_RIFLE Triggerbot::Key RMB
221 | ASSAULT_RIFLE Triggerbot::HoldKey 1
222 | ASSAULT_RIFLE Triggerbot::PlaySound 0
223 | ASSAULT_RIFLE Triggerbot::KeySpraydown MB2
224 | ASSAULT_RIFLE Triggerbot::Mode 2
225 | ASSAULT_RIFLE Triggerbot::PauseAfterShot 100
226 | ASSAULT_RIFLE Triggerbot::PauseRangeExtensionFactor 0.20
227 | ASSAULT_RIFLE Triggerbot::FakeShotDuration 150
228 | ASSAULT_RIFLE Triggerbot::FireExtension 320
229 | ASSAULT_RIFLE Triggerbot::Delay 0
230 | ASSAULT_RIFLE Triggerbot::MaximumDistance 10000.0
231 | ASSAULT_RIFLE Triggerbot::MaximumVelocity 300.0
232 | ASSAULT_RIFLE Triggerbot::DisableWhileEnteringScope 0
233 | ASSAULT_RIFLE Triggerbot::EnableInScopeOnly 0
234 | ASSAULT_RIFLE Triggerbot::HeadOnly 0
235 | ASSAULT_RIFLE Triggerbot::FriendlyFire 0
236 | ASSAULT_RIFLE Triggerbot::VisibilityCheck 1
237 |
238 | SG553 Triggerbot::Key ALT
239 | AUG Triggerbot::Key ALT
240 |
241 | PISTOL Triggerbot::On 1
242 | PISTOL Triggerbot::Key MB2
243 | PISTOL Triggerbot::HoldKey 1
244 | PISTOL Triggerbot::PlaySound 0
245 | PISTOL Triggerbot::KeySpraydown F11
246 | PISTOL Triggerbot::Mode 2
247 | PISTOL Triggerbot::PauseAfterShot 100
248 | PISTOL Triggerbot::PauseRangeExtensionFactor 0.10
249 | PISTOL Triggerbot::FakeShotDuration 250
250 | PISTOL Triggerbot::FireExtension 0
251 | PISTOL Triggerbot::Delay 0
252 | PISTOL Triggerbot::MaximumDistance 10000.0
253 | PISTOL Triggerbot::MaximumVelocity 300.0
254 | PISTOL Triggerbot::DisableWhileEnteringScope 0
255 | PISTOL Triggerbot::EnableInScopeOnly 0
256 | PISTOL Triggerbot::HeadOnly 0
257 | PISTOL Triggerbot::FriendlyFire 0
258 | PISTOL Triggerbot::VisibilityCheck 1
259 |
260 | REVOLVER Triggerbot::On 0
261 |
262 | GLOCK18 Triggerbot::PauseAfterShot 150
263 | GLOCK18 Triggerbot::PauseRangeExtensionFactor 0.05
264 |
265 | P2000 Triggerbot::PauseAfterShot 150
266 | P2000 Triggerbot::PauseRangeExtensionFactor 0.20
267 |
268 | USPS Triggerbot::PauseAfterShot 150
269 | USPS Triggerbot::PauseRangeExtensionFactor 0.20
270 |
271 | BERETTAS Triggerbot::PauseAfterShot 120
272 | BERETTAS Triggerbot::PauseRangeExtensionFactor 0.05
273 |
274 | P250 Triggerbot::PauseAfterShot 120
275 | P250 Triggerbot::PauseRangeExtensionFactor 0.10
276 |
277 | FIVESEVEN Triggerbot::PauseAfterShot 120
278 | FIVESEVEN Triggerbot::PauseRangeExtensionFactor 0.10
279 |
280 | TEC9 Triggerbot::PauseAfterShot 120
281 | TEC9 Triggerbot::PauseRangeExtensionFactor 0.15
282 |
283 | CZ75A Triggerbot::PauseAfterShot 0
284 | CZ75A Triggerbot::PauseRangeExtensionFactor 0.10
285 |
286 | TASER Triggerbot::MaximumDistance 180.0
287 |
288 | PISTOL VARIANT_KEY UP_ARROW Variant::HoldKey 0
289 | PISTOL VARIANT_KEY UP_ARROW Variant::PlaySound 1
290 | PISTOL VARIANT_KEY UP_ARROW Triggerbot::HoldKey 0
291 |
292 | DEAGLE Triggerbot::On 1
293 | DEAGLE Triggerbot::Key MB2
294 | DEAGLE Triggerbot::HoldKey 1
295 | DEAGLE Triggerbot::PlaySound 0
296 | DEAGLE Triggerbot::KeySpraydown F11
297 | DEAGLE Triggerbot::Mode 2
298 | DEAGLE Triggerbot::PauseAfterShot 200
299 | DEAGLE Triggerbot::PauseRangeExtensionFactor 0.30
300 | DEAGLE Triggerbot::FakeShotDuration 0
301 | DEAGLE Triggerbot::FireExtension 0
302 | DEAGLE Triggerbot::Delay 0
303 | DEAGLE Triggerbot::MaximumDistance 10000.0
304 | DEAGLE Triggerbot::MaximumVelocity 800.0
305 | DEAGLE Triggerbot::DisableWhileEnteringScope 0
306 | DEAGLE Triggerbot::EnableInScopeOnly 0
307 | DEAGLE Triggerbot::HeadOnly 0
308 | DEAGLE Triggerbot::FriendlyFire 0
309 | DEAGLE Triggerbot::VisibilityCheck 1
310 |
311 | SUBMACHINE_GUN Triggerbot::On 1
312 | SUBMACHINE_GUN Triggerbot::Key RMB
313 | SUBMACHINE_GUN Triggerbot::HoldKey 1
314 | SUBMACHINE_GUN Triggerbot::PlaySound 0
315 | SUBMACHINE_GUN Triggerbot::KeySpraydown MB2
316 | SUBMACHINE_GUN Triggerbot::Mode 2
317 | SUBMACHINE_GUN Triggerbot::PauseAfterShot 100
318 | SUBMACHINE_GUN Triggerbot::PauseRangeExtensionFactor 0.20
319 | SUBMACHINE_GUN Triggerbot::FakeShotDuration 150
320 | SUBMACHINE_GUN Triggerbot::FireExtension 275
321 | SUBMACHINE_GUN Triggerbot::Delay 0
322 | SUBMACHINE_GUN Triggerbot::MaximumDistance 10000.0
323 | SUBMACHINE_GUN Triggerbot::MaximumVelocity 300.0
324 | SUBMACHINE_GUN Triggerbot::DisableWhileEnteringScope 0
325 | SUBMACHINE_GUN Triggerbot::EnableInScopeOnly 0
326 | SUBMACHINE_GUN Triggerbot::HeadOnly 0
327 | SUBMACHINE_GUN Triggerbot::FriendlyFire 0
328 | SUBMACHINE_GUN Triggerbot::VisibilityCheck 1
329 |
330 | SNIPER_RIFLE Triggerbot::On 1
331 | SNIPER_RIFLE Triggerbot::Key MB2
332 | SNIPER_RIFLE Triggerbot::HoldKey 1
333 | SNIPER_RIFLE Triggerbot::PlaySound 0
334 | SNIPER_RIFLE Triggerbot::KeySpraydown F12
335 | SNIPER_RIFLE Triggerbot::Mode 2
336 | SNIPER_RIFLE Triggerbot::PauseAfterShot 400
337 | SNIPER_RIFLE Triggerbot::PauseRangeExtensionFactor 0.0
338 | SNIPER_RIFLE Triggerbot::FakeShotDuration 0
339 | SNIPER_RIFLE Triggerbot::FireExtension 0
340 | SNIPER_RIFLE Triggerbot::Delay 0
341 | SNIPER_RIFLE Triggerbot::MaximumDistance 10000.0
342 | SNIPER_RIFLE Triggerbot::MaximumVelocity 300.0
343 | SNIPER_RIFLE Triggerbot::DisableWhileEnteringScope 1
344 | SNIPER_RIFLE Triggerbot::EnableInScopeOnly 0
345 | SNIPER_RIFLE Triggerbot::HeadOnly 0
346 | SNIPER_RIFLE Triggerbot::FriendlyFire 0
347 | SNIPER_RIFLE Triggerbot::VisibilityCheck 1
348 |
349 | G3SG1 Triggerbot::PauseAfterShot 100
350 | G3SG1 Triggerbot::FakeShotDuration 300
351 | G3SG1 Triggerbot::DisableWhileEnteringScope 0
352 | G3SG1 Triggerbot::EnableInScopeOnly 0
353 |
354 | SCAR20 Triggerbot::PauseAfterShot 100
355 | SCAR20 Triggerbot::FakeShotDuration 300
356 | SCAR20 Triggerbot::DisableWhileEnteringScope 0
357 | SCAR20 Triggerbot::EnableInScopeOnly 0
358 |
359 | SNIPER_RIFLE VARIANT_KEY UP_ARROW Variant::HoldKey 0
360 | SNIPER_RIFLE VARIANT_KEY UP_ARROW Variant::PlaySound 1
361 | SNIPER_RIFLE VARIANT_KEY UP_ARROW Triggerbot::HoldKey 0
362 | SNIPER_RIFLE VARIANT_KEY UP_ARROW Triggerbot::EnableInScopeOnly 1
363 |
364 | SNIPER_RIFLE VARIANT_KEY ALT Triggerbot::VisibilityCheck 0
365 |
366 | SHOTGUN Triggerbot::On 1
367 | SHOTGUN Triggerbot::Key MB2
368 | SHOTGUN Triggerbot::HoldKey 1
369 | SHOTGUN Triggerbot::PlaySound 0
370 | SHOTGUN Triggerbot::KeySpraydown F11
371 | SHOTGUN Triggerbot::Mode 2
372 | SHOTGUN Triggerbot::PauseAfterShot 200
373 | SHOTGUN Triggerbot::PauseRangeExtensionFactor 0.0
374 | SHOTGUN Triggerbot::FakeShotDuration 0
375 | SHOTGUN Triggerbot::FireExtension 0
376 | SHOTGUN Triggerbot::Delay 0
377 | SHOTGUN Triggerbot::MaximumDistance 1000.0
378 | SHOTGUN Triggerbot::MaximumVelocity 400.0
379 | SHOTGUN Triggerbot::DisableWhileEnteringScope 0
380 | SHOTGUN Triggerbot::EnableInScopeOnly 0
381 | SHOTGUN Triggerbot::HeadOnly 0
382 | SHOTGUN Triggerbot::FriendlyFire 0
383 | SHOTGUN Triggerbot::VisibilityCheck 1
384 |
385 | # ____________________________________________________________
386 | #
387 | # GLOW ESP / WALLHACK
388 | #
389 | # ------------------------------------------------------------
390 |
391 | GlowESP::On 1
392 | GlowESP::Key F7
393 | GlowESP::HoldKey 0
394 | GlowESP::PlaySound 1
395 | GlowESP::ToggleForAllWeapons 1
396 | GlowESP::SpottedOnly 0
397 | GlowESP::DistinctColors 0
398 | GlowESP::DistinctMixFactor 1.0
399 | GlowESP::RGBA_Friendly 0x00FFFF00
400 | GlowESP::RGBA_Friendly1HP 0xFF000000
401 | GlowESP::RGBA_Hostile 0xFFFFFF00
402 | GlowESP::RGBA_Hostile1HP 0xFF000000
403 | GlowESP::RGBA_Weapon 0xFFFFFF00
404 | GlowESP::RGBA_Grenade 0xFFFFFF00
405 | GlowESP::RGBA_Bomb 0xFF6600FF
406 | GlowESP::RGBA_Money 0x44AA00A0
407 |
408 | GlowESP::RGBA_DistinctColors 0xff2a00ff
409 | GlowESP::RGBA_DistinctColors 0xffff00ff
410 | GlowESP::RGBA_DistinctColors 0x00ff54ff
411 | GlowESP::RGBA_DistinctColors 0x00a8ffff
412 | GlowESP::RGBA_DistinctColors 0xd500ffff
413 |
414 | VARIANT_KEY ALT GlowESP::DistinctColors 1
415 | VARIANT_KEY ALT Variant::HoldKey 1
416 | VARIANT_KEY ALT Variant::PlaySound 0
417 |
418 | # ____________________________________________________________
419 | #
420 | # RECOIL CONTROL SYSTEM (RCS)
421 | #
422 | # ------------------------------------------------------------
423 |
424 | RCS::On 0
425 | RCS::Key F10
426 | RCS::HoldKey 0
427 | RCS::PlaySound 1
428 | RCS::ReductionFactor 0.75
429 | RCS::SyncPause 10
430 |
431 | # ____________________________________________________________
432 | #
433 | # AIMBOT
434 | #
435 | # ------------------------------------------------------------
436 |
437 | Aimbot::On 0
438 | Aimbot::Key LMB
439 | Aimbot::HoldKey 1
440 | Aimbot::PlaySound 0
441 | Aimbot::FieldOfView 1.0
442 | Aimbot::SingleShot 0
443 | Aimbot::FireShotIfNoTargetFound 0
444 | Aimbot::VisibilityCheck 1
445 | Aimbot::FriendlyFire 0
446 |
447 | DEAGLE Aimbot::On 1
448 | DEAGLE Aimbot::Key MB2
449 | DEAGLE Aimbot::HoldKey 1
450 | DEAGLE Aimbot::PlaySound 0
451 | DEAGLE Aimbot::FieldOfView 1.0
452 | DEAGLE Aimbot::SingleShot 1
453 | DEAGLE Aimbot::FireShotIfNoTargetFound 0
454 | DEAGLE Aimbot::VisibilityCheck 1
455 | DEAGLE Aimbot::FriendlyFire 0
456 |
457 | DEAGLE VARIANT_KEY RMB Aimbot::Key RMB
458 | DEAGLE VARIANT_KEY RMB Aimbot::FieldOfView 2.0
459 | DEAGLE VARIANT_KEY RMB Aimbot::VisibilityCheck 0
460 | DEAGLE VARIANT_KEY RMB Aimbot::FireShotIfNoTargetFound 1
461 |
462 | ASSAULT_RIFLE Aimbot::On 1
463 | ASSAULT_RIFLE Aimbot::Key MB2
464 | ASSAULT_RIFLE Aimbot::HoldKey 1
465 | ASSAULT_RIFLE Aimbot::PlaySound 0
466 | ASSAULT_RIFLE Aimbot::FieldOfView 1.0
467 | ASSAULT_RIFLE Aimbot::SingleShot 1
468 | ASSAULT_RIFLE Aimbot::FireShotIfNoTargetFound 0
469 | ASSAULT_RIFLE Aimbot::VisibilityCheck 1
470 | ASSAULT_RIFLE Aimbot::FriendlyFire 0
471 |
472 | AK47 VARIANT_KEY RMB Aimbot::Key RMB
473 | AK47 VARIANT_KEY RMB Aimbot::FieldOfView 2.0
474 | AK47 VARIANT_KEY RMB Aimbot::VisibilityCheck 0
475 | AK47 VARIANT_KEY RMB Aimbot::FireShotIfNoTargetFound 1
--------------------------------------------------------------------------------
/config/offsets.json:
--------------------------------------------------------------------------------
1 | {
2 | "timestamp": 1666429720,
3 | "signatures": {
4 | "anim_overlays": 10640,
5 | "clientstate_choked_commands": 19760,
6 | "clientstate_delta_ticks": 372,
7 | "clientstate_last_outgoing_command": 19756,
8 | "clientstate_net_channel": 156,
9 | "convar_name_hash_table": 197024,
10 | "dwClientState": 5894548,
11 | "dwClientState_GetLocalPlayer": 384,
12 | "dwClientState_IsHLTV": 19784,
13 | "dwClientState_Map": 652,
14 | "dwClientState_MapDirectory": 392,
15 | "dwClientState_MaxPlayer": 904,
16 | "dwClientState_PlayerInfo": 21184,
17 | "dwClientState_State": 264,
18 | "dwClientState_ViewAngles": 19856,
19 | "dwEntityList": 81772132,
20 | "dwForceAttack": 52600012,
21 | "dwForceAttack2": 52600024,
22 | "dwForceBackward": 52599928,
23 | "dwForceForward": 52600060,
24 | "dwForceJump": 86735852,
25 | "dwForceLeft": 52599940,
26 | "dwForceRight": 52599952,
27 | "dwGameDir": 6532480,
28 | "dwGameRulesProxy": 87208988,
29 | "dwGetAllClasses": 14712796,
30 | "dwGlobalVars": 5893720,
31 | "dwGlowObjectManager": 87386384,
32 | "dwInput": 86348856,
33 | "dwInterfaceLinkList": 10062964,
34 | "dwLocalPlayer": 14575972,
35 | "dwMouseEnable": 86200472,
36 | "dwMouseEnablePtr": 86200424,
37 | "dwPlayerResource": 52592656,
38 | "dwRadarBase": 86190396,
39 | "dwSetClanTag": 580224,
40 | "dwViewMatrix": 81710228,
41 | "dwWeaponTable": 86353172,
42 | "dwWeaponTableIndex": 12908,
43 | "dwbSendPackets": 905058,
44 | "dwppDirect3DDevice9": 680640,
45 | "find_hud_element": 687004144,
46 | "force_update_spectator_glow": 4026730,
47 | "interface_engine_cvar": 260764,
48 | "is_c4_owner": 4082080,
49 | "m_bDormant": 237,
50 | "m_bIsLocalPlayer": 13864,
51 | "m_flSpawnTime": 66496,
52 | "m_pStudioHdr": 10576,
53 | "m_pitchClassPtr": 86200208,
54 | "model_ambient_min": 5902732,
55 | "set_abs_angles": 1986704,
56 | "set_abs_origin": 1986256
57 | },
58 | "netvars": {
59 | "cs_gamerules_data": 0,
60 | "m_ArmorValue": 71628,
61 | "m_Collision": 800,
62 | "m_CollisionGroup": 1140,
63 | "m_Local": 12236,
64 | "m_MoveType": 604,
65 | "m_OriginalOwnerXuidHigh": 12756,
66 | "m_OriginalOwnerXuidLow": 12752,
67 | "m_SurvivalGameRuleDecisionTypes": 4904,
68 | "m_SurvivalRules": 3328,
69 | "m_aimPunchAngle": 12348,
70 | "m_aimPunchAngleVel": 12360,
71 | "m_angEyeAnglesX": 71632,
72 | "m_angEyeAnglesY": 71636,
73 | "m_bBombDefused": 10688,
74 | "m_bBombPlanted": 2469,
75 | "m_bBombTicking": 10640,
76 | "m_bFreezePeriod": 32,
77 | "m_bGunGameImmunity": 39312,
78 | "m_bHasDefuser": 71644,
79 | "m_bHasHelmet": 71616,
80 | "m_bInReload": 12981,
81 | "m_bIsDefusing": 39292,
82 | "m_bIsQueuedMatchmaking": 116,
83 | "m_bIsScoped": 39284,
84 | "m_bIsValveDS": 124,
85 | "m_bSpotted": 2365,
86 | "m_bSpottedByMask": 2432,
87 | "m_bStartedArming": 13312,
88 | "m_bUseCustomAutoExposureMax": 2521,
89 | "m_bUseCustomAutoExposureMin": 2520,
90 | "m_bUseCustomBloomScale": 2522,
91 | "m_clrRender": 112,
92 | "m_dwBoneMatrix": 9896,
93 | "m_fAccuracyPenalty": 13120,
94 | "m_fFlags": 260,
95 | "m_flC4Blow": 10656,
96 | "m_flCustomAutoExposureMax": 2528,
97 | "m_flCustomAutoExposureMin": 2524,
98 | "m_flCustomBloomScale": 2532,
99 | "m_flDefuseCountDown": 10684,
100 | "m_flDefuseLength": 10680,
101 | "m_flFallbackWear": 12768,
102 | "m_flFlashDuration": 66672,
103 | "m_flFlashMaxAlpha": 66668,
104 | "m_flLastBoneSetupTime": 10536,
105 | "m_flLowerBodyYawTarget": 39644,
106 | "m_flNextAttack": 11648,
107 | "m_flNextPrimaryAttack": 12872,
108 | "m_flSimulationTime": 616,
109 | "m_flTimerLength": 10660,
110 | "m_hActiveWeapon": 12040,
111 | "m_hBombDefuser": 10692,
112 | "m_hMyWeapons": 11784,
113 | "m_hObserverTarget": 13212,
114 | "m_hOwner": 10716,
115 | "m_hOwnerEntity": 332,
116 | "m_hViewModel": 13064,
117 | "m_iAccountID": 12248,
118 | "m_iClip1": 12916,
119 | "m_iCompetitiveRanking": 6788,
120 | "m_iCompetitiveWins": 7048,
121 | "m_iCrosshairId": 71736,
122 | "m_iDefaultFOV": 13116,
123 | "m_iEntityQuality": 12220,
124 | "m_iFOV": 12788,
125 | "m_iFOVStart": 12792,
126 | "m_iGlowIndex": 66696,
127 | "m_iHealth": 256,
128 | "m_iItemDefinitionIndex": 12218,
129 | "m_iItemIDHigh": 12240,
130 | "m_iMostRecentModelBoneCounter": 9872,
131 | "m_iObserverMode": 13192,
132 | "m_iShotsFired": 66528,
133 | "m_iState": 12904,
134 | "m_iTeamNum": 244,
135 | "m_lifeState": 607,
136 | "m_nBombSite": 10644,
137 | "m_nFallbackPaintKit": 12760,
138 | "m_nFallbackSeed": 12764,
139 | "m_nFallbackStatTrak": 12772,
140 | "m_nForceBone": 9868,
141 | "m_nModelIndex": 600,
142 | "m_nTickBase": 13376,
143 | "m_nViewModelIndex": 10704,
144 | "m_rgflCoordinateFrame": 1092,
145 | "m_szCustomName": 12364,
146 | "m_szLastPlaceName": 13764,
147 | "m_thirdPersonViewAngles": 12776,
148 | "m_vecOrigin": 312,
149 | "m_vecVelocity": 276,
150 | "m_vecViewOffset": 264,
151 | "m_viewPunchAngle": 12336,
152 | "m_zoomLevel": 13280
153 | }
154 | }
--------------------------------------------------------------------------------
/cs_hack.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.2.32602.215
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hack", "hack\hack.vcxproj", "{5720BD26-8B8E-458C-944F-979A41900164}"
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 | {5720BD26-8B8E-458C-944F-979A41900164}.Debug|x64.ActiveCfg = Debug|Win32
17 | {5720BD26-8B8E-458C-944F-979A41900164}.Debug|x64.Build.0 = Debug|Win32
18 | {5720BD26-8B8E-458C-944F-979A41900164}.Debug|x86.ActiveCfg = Debug|Win32
19 | {5720BD26-8B8E-458C-944F-979A41900164}.Debug|x86.Build.0 = Debug|Win32
20 | {5720BD26-8B8E-458C-944F-979A41900164}.Release|x64.ActiveCfg = Release|Win32
21 | {5720BD26-8B8E-458C-944F-979A41900164}.Release|x64.Build.0 = Release|Win32
22 | {5720BD26-8B8E-458C-944F-979A41900164}.Release|x86.ActiveCfg = Release|Win32
23 | {5720BD26-8B8E-458C-944F-979A41900164}.Release|x86.Build.0 = Release|Win32
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {969B531A-8F1C-4852-BB17-0C07920ADB90}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/hack/aim_assist.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #include "aim_assist.h"
5 | #include "utility.h"
6 | #include "entity.h"
7 | #include "weapon.h"
8 |
9 | AimAssist::AimAssist()
10 | {
11 | target_id = -1;
12 | target_bone = HEAD;
13 | t_target_killed = 0;
14 | t_last_tick = std::clock();
15 | distance = 2000.f;
16 | active_last_tick = false;
17 | t_activation = std::clock();
18 | t_last_velocity_update = std::clock();
19 | t_start = std::clock();
20 | }
21 |
22 | void AimAssist::Activate()
23 | {
24 | if (!active_last_tick) t_activation = std::clock();
25 | active_last_tick = true;
26 |
27 | if (ptr_active_weapon->weapon_type == WeaponType::KNIFE || ptr_active_weapon->weapon_type == WeaponType::GRENADE || ptr_active_weapon->weapon_type == WeaponType::BOMB ||
28 | (ptr_active_weapon->weapon_type == WeaponType::SNIPER_RIFLE && !ptr_local_entity->in_scope))
29 | {
30 | t_last_tick = std::clock();
31 | return;
32 | }
33 |
34 | if (target_id != -1 && (ptr_entity_list + target_id)->life_state != LIFE_STATE_ALIVE)
35 | {
36 | t_target_killed = std::clock();
37 | target_id = -1;
38 | }
39 |
40 | if (Search(&target_id)) ConvergeViewAngle();
41 | t_last_tick = std::clock();
42 | }
43 |
44 | void AimAssist::Reset()
45 | {
46 | active_last_tick = false;
47 | }
48 |
49 | void AimAssist::ConvergeViewAngle()
50 | {
51 | Axis d_omega = Axis(150.f, 150.f);
52 | if (ptr_local_entity->shots_fired == 0) d_omega.MultiplyDirect(ptr_active_weapon->GetActiveConfig()->aim_assist_tracking_speed);
53 | else d_omega.MultiplyDirect(ptr_active_weapon->GetActiveConfig()->aim_assist_tracking_speed_fire);
54 |
55 | Axis local_view = ptr_local_entity->local_view;
56 | Axis target_view;
57 |
58 | float target_velocity = (ptr_entity_list + target_id)->velocity;
59 | if (target_velocity > 250.f) target_velocity = 250.f;
60 |
61 | distance = (ptr_local_entity->origin - (ptr_entity_list + target_id)->origin).Abs();
62 |
63 | float pred = static_cast(ptr_active_weapon->GetActiveConfig()->aim_assist_movement_prediction) * target_velocity / 1000.f;
64 | Vector movement_prediction = (ptr_entity_list + target_id)->velocity_vector.UnitVector() * pred;
65 |
66 | if (ptr_active_weapon->GetActiveConfig()->aim_assist_force_headshot && ptr_local_entity->shots_fired <= ptr_active_weapon->GetActiveConfig()->aim_assist_force_body_after_shots)
67 | {
68 | target_view = Vector::AxisFromVector(ptr_local_entity->origin_view - (ptr_entity_list + target_id)->origin_head - movement_prediction);
69 | }
70 | else if (ptr_local_entity->shots_fired > ptr_active_weapon->GetActiveConfig()->aim_assist_force_body_after_shots)
71 | {
72 | target_view = Vector::AxisFromVector(ptr_local_entity->origin_view - (ptr_entity_list + target_id)->origin_chest - movement_prediction);
73 | }
74 | else
75 | {
76 | Axis target_view_head = Vector::AxisFromVector(ptr_local_entity->origin_view - (ptr_entity_list + target_id)->origin_head - movement_prediction);
77 | Axis target_view_chest = Vector::AxisFromVector(ptr_local_entity->origin_view - (ptr_entity_list + target_id)->origin_chest - movement_prediction);
78 | Axis target_view_stomach = Vector::AxisFromVector(ptr_local_entity->origin_view - (ptr_entity_list + target_id)->origin_stomach - movement_prediction);
79 |
80 | if (local_view.DistanceAbs(target_view_head).Abs() < local_view.DistanceAbs(target_view_chest).Abs())
81 | {
82 | target_bone = HEAD;
83 | target_view = target_view_head;
84 | }
85 | else
86 | {
87 | target_bone = CHEST;
88 | target_view = target_view_chest;
89 | }
90 | }
91 |
92 | target_view.SubtractDirect(ptr_local_entity->local_punch.Multiply(2.f * ptr_active_weapon->GetActiveConfig()->aim_assist_punch));
93 | Axis diff = target_view.DistanceAbs(local_view);
94 | float diff_angle = diff.Abs();
95 |
96 | float hitbox = HitboxRadius();
97 |
98 | if (distance < 20.f) return;
99 | if (ptr_local_entity->ammunition == 0) return;
100 | if (ptr_local_entity->reloading) return;
101 |
102 | if (Utility::ClockDiff(std::clock(), t_activation) < ptr_active_weapon->GetActiveConfig()->aim_assist_activation_softening)
103 | {
104 | double progress = static_cast(Utility::ClockDiff(std::clock(), t_activation)) / static_cast(ptr_active_weapon->GetActiveConfig()->aim_assist_activation_softening);
105 | d_omega.MultiplyDirect(static_cast(progress));
106 | }
107 |
108 | if (Utility::ClockDiff(std::clock(), (ptr_entity_list + target_id)->t_crouching) < ptr_active_weapon->GetActiveConfig()->aim_assist_crouch_delay)
109 | {
110 | double progress = static_cast(Utility::ClockDiff(std::clock(), (ptr_entity_list + target_id)->t_crouching)) / static_cast(ptr_active_weapon->GetActiveConfig()->aim_assist_crouch_delay);
111 | d_omega.MultiplyDirect(static_cast(progress));
112 | }
113 |
114 | if (Utility::ClockDiff(std::clock(), (ptr_entity_list + target_id)->t_on_ground) < ptr_active_weapon->GetActiveConfig()->aim_assist_jump_delay)
115 | {
116 | double progress = static_cast(Utility::ClockDiff(std::clock(), (ptr_entity_list + target_id)->t_on_ground)) / static_cast(ptr_active_weapon->GetActiveConfig()->aim_assist_jump_delay);
117 | d_omega.MultiplyDirect(static_cast(progress));
118 | }
119 |
120 | if (ptr_active_weapon->weapon_type == WeaponType::SNIPER_RIFLE && Utility::ClockDiff(std::clock(), ptr_local_entity->t_not_in_scope) < 200)
121 | {
122 | double progress = static_cast(Utility::ClockDiff(std::clock(), ptr_local_entity->t_not_in_scope)) / 200.0;
123 | d_omega.MultiplyDirect(static_cast(progress));
124 | }
125 |
126 | if (ptr_local_entity->shots_fired == 0 && Utility::ClockDiff(std::clock(), (ptr_entity_list + target_id)->t_spot_local_entity) < ptr_active_weapon->GetActiveConfig()->aim_assist_spot_delay)
127 | {
128 | double progress = static_cast(
129 | Utility::ClockDiff(std::clock(), (ptr_entity_list + target_id)->t_spot_local_entity)) /
130 | static_cast(ptr_active_weapon->GetActiveConfig()->aim_assist_spot_delay);
131 | d_omega.MultiplyDirect(static_cast(std::pow(progress, 2)));
132 | }
133 |
134 | if (Utility::ClockDiff(std::clock(), t_target_killed) < ptr_active_weapon->GetActiveConfig()->aim_assist_transfer_pause)
135 | {
136 | double progress = static_cast(
137 | Utility::ClockDiff(std::clock(), t_target_killed)) / static_cast(ptr_active_weapon->GetActiveConfig()->aim_assist_transfer_pause);
138 | d_omega.MultiplyDirect(static_cast(std::pow(progress, 2)));
139 | }
140 |
141 | if (Utility::ClockDiff(std::clock(), ptr_local_entity->t_last_weapon_change) < ptr_active_weapon->time) return;
142 |
143 | if (ptr_local_entity->velocity > ptr_active_weapon->GetActiveConfig()->aim_assist_maximum_velocity) return;
144 | else if (ptr_active_weapon->GetActiveConfig()->aim_assist_linear_velocity_mapping) d_omega.MultiplyDirect(1.f - ptr_local_entity->velocity / ptr_active_weapon->GetActiveConfig()->aim_assist_maximum_velocity);
145 |
146 | if (!ptr_local_entity->on_ground) d_omega.MultiplyDirect(0.3f);
147 | if (!(ptr_entity_list + target_id)->on_ground) d_omega.MultiplyDirect(0.4f);
148 |
149 | int pause = ptr_active_weapon->GetActiveConfig()->aim_assist_fire_pause;
150 | pause += static_cast(ptr_active_weapon->GetActiveConfig()->aim_assist_pause_range_extension * distance);
151 | int time_since_shot = Utility::ClockDiff(std::clock(), ptr_local_entity->t_shot_fired);
152 |
153 | if (ptr_local_entity->shots_fired == 0 && pause != 0 && time_since_shot < pause)
154 | {
155 | double progress = static_cast(time_since_shot) / static_cast(pause);
156 | d_omega.MultiplyDirect(static_cast(std::pow(progress, 2)));
157 | }
158 |
159 | float ratio = std::abs((local_view.pitch - target_view.pitch) / (local_view.yaw - target_view.yaw));
160 | d_omega.yaw = d_omega.Abs() * std::sqrt(1 / (1 + ratio * ratio));
161 | d_omega.pitch = d_omega.yaw * ratio;
162 |
163 | if (diff_angle < hitbox * ptr_active_weapon->GetActiveConfig()->aim_assist_curb_zone) d_omega.MultiplyDirect(diff_angle / (hitbox * ptr_active_weapon->GetActiveConfig()->aim_assist_curb_zone));
164 | if (diff_angle < hitbox) d_omega.MultiplyDirect(static_cast(diff_angle / hitbox));
165 |
166 | d_omega.MultiplyDirect(std::atan(300.f / distance));
167 |
168 | float distance_factor = 1.f - (distance / 4000.f) * ptr_active_weapon->GetActiveConfig()->aim_assist_distance_reduction;
169 | if (distance_factor < 0.1f) distance_factor = 0.1f;
170 | d_omega.MultiplyDirect(distance_factor);
171 |
172 | d_omega.MultiplyDirect(static_cast(Utility::ClockDiff(std::clock(), t_last_tick)) / 1000.f);
173 |
174 | if (d_omega.pitch > 0.9f) d_omega.pitch = 0.9f;
175 | if (d_omega.yaw > 0.9f) d_omega.yaw = 0.9f;
176 |
177 | if (local_view.ReferenceEntityRightsided(target_view)) d_omega.yaw *= -1.f;
178 | if (local_view.yaw < -90.f && target_view.yaw > 90.f) d_omega.yaw *= -1.f;
179 | if (local_view.ReferenceEntityHigher(target_view)) d_omega.pitch *= -1.f;
180 |
181 | Memory::SubtractFromViewAngle(d_omega);
182 | }
183 |
184 | float AimAssist::HitboxRadius()
185 | {
186 | float width;
187 | switch (target_bone)
188 | {
189 | case HEAD:
190 | width = 3.f;
191 | break;
192 | case CHEST:
193 | width = 8.f;
194 | break;
195 | case STOMACH:
196 | width = 6.f;
197 | break;
198 | default:
199 | width = 8.f;
200 | break;
201 | }
202 | return std::atan(width / distance) * 180.f / PI;
203 | }
204 |
205 | bool AimAssist::Search(int* id)
206 | {
207 | float diff = 99999.f;
208 | int tmp_target_id = -1;
209 |
210 | if (ptr_active_weapon->GetActiveConfig()->aim_assist_stick_to_target &&
211 | ptr_local_entity->shots_fired != 0 &&
212 | (ptr_entity_list + *id) != 0 &&
213 | (ptr_entity_list + *id)->init &&
214 | (ptr_entity_list + *id)->spotted_by_local_entity) return true;
215 |
216 | for (int i = 0; i <= 256; i++)
217 | {
218 | if ((ptr_entity_list + i) == 0) continue;
219 | if (!(ptr_entity_list + i)->init) continue;
220 |
221 | if ((ptr_active_weapon->GetActiveConfig()->aim_assist_friendly_fire || (ptr_entity_list + i)->team != ptr_local_entity->team) && (ptr_entity_list + i)->dormant == 0 && (ptr_entity_list + i)->life_state == LIFE_STATE_ALIVE && !(ptr_entity_list + i)->immune)
222 | {
223 | if (ptr_active_weapon->GetActiveConfig()->aim_assist_visibility_check && !(ptr_entity_list + i)->spotted_by_local_entity) continue;
224 |
225 | float comp_val;
226 | comp_val = Vector::AxisFromVector(ptr_local_entity->origin_view - (ptr_entity_list + i)->origin).DistanceAbs(ptr_local_entity->local_view).yaw;
227 | if (comp_val < diff)
228 | {
229 | tmp_target_id = i;
230 | diff = comp_val;
231 | }
232 | }
233 | }
234 |
235 | if (tmp_target_id == -1)
236 | {
237 | *id = -1;
238 | return false;
239 | }
240 |
241 | Axis target_view = Vector::AxisFromVector(ptr_local_entity->origin_view - (ptr_entity_list + tmp_target_id)->origin_head);
242 |
243 | float fov = 0.f;
244 | if (ptr_active_weapon->GetActiveConfig()->aim_assist_field_of_view_type == FOV_TYPE_DEGREE) fov = ptr_active_weapon->GetActiveConfig()->aim_assist_field_of_view;
245 | else if (ptr_active_weapon->GetActiveConfig()->aim_assist_field_of_view_type == FOV_TYPE_SOURCE_ENGINE_UNITS)
246 | fov = std::atan(ptr_active_weapon->GetActiveConfig()->aim_assist_field_of_view / (ptr_local_entity->origin - (ptr_entity_list + tmp_target_id)->origin).Abs()) * 180.f / PI;
247 |
248 | if (target_view.DistanceAbs(ptr_local_entity->local_view).Abs() < fov / 2.f)
249 | {
250 | *id = tmp_target_id;
251 | return true;
252 | }
253 | else
254 | {
255 | *id = -1;
256 | return false;
257 | }
258 | }
--------------------------------------------------------------------------------
/hack/aim_assist.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | class AimAssist
5 | {
6 | public:
7 | AimAssist();
8 | void Activate();
9 | void Reset();
10 | private:
11 | std::clock_t t_activation;
12 | std::clock_t t_start;
13 | std::clock_t t_last_tick;
14 | std::clock_t t_last_velocity_update;
15 | std::clock_t t_target_killed;
16 |
17 | bool active_last_tick;
18 | float distance;
19 | int target_id;
20 | short target_bone;
21 |
22 | void ConvergeViewAngle();
23 | float HitboxRadius();
24 | bool Search(int* id);
25 | };
--------------------------------------------------------------------------------
/hack/aimbot.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include "aimbot.h"
4 | #include "memory.h"
5 | #include "entity.h"
6 | #include "configuration.h"
7 | #include "weapon.h"
8 | #include "utility.h"
9 |
10 | Aimbot::Aimbot()
11 | {
12 | shot_fired = false;
13 | active_last_tick = false;
14 | }
15 |
16 | void Aimbot::Update()
17 | {
18 | if (ptr_local_entity->ammunition == 0) return;
19 | if (ptr_local_entity->reloading) return;
20 | if (Utility::ClockDiff(std::clock(), ptr_local_entity->t_last_weapon_change) < ptr_active_weapon->time) return;
21 |
22 | if (!active_last_tick || Utility::ClockDiff(std::clock(), ptr_local_entity->t_last_weapon_change) < 50) shot_fired = false;
23 | active_last_tick = true;
24 |
25 | if (ptr_active_weapon->GetActiveConfig()->aimbot_single_shot && shot_fired) return;
26 |
27 | int id;
28 | if (Search(&id))
29 | {
30 | Memory::SetAngle(Vector::AxisFromVector(ptr_local_entity->origin_view - (ptr_entity_list + id)->origin_head).SubtractNorm(ptr_local_entity->local_punch.Multiply(2.f)));
31 |
32 | if (ptr_active_weapon->GetActiveConfig()->aimbot_single_shot)
33 | {
34 | // dangerous
35 | INPUT input = { 0 };
36 | input.type = INPUT_MOUSE;
37 | input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
38 | SendInput(1, &input, sizeof(INPUT));
39 | input.mi.dwFlags = MOUSEEVENTF_LEFTUP;
40 | SendInput(1, &input, sizeof(INPUT));
41 | shot_fired = true;
42 | ptr_local_entity->t_shot_fired = std::clock();
43 | }
44 | }
45 | else if (ptr_active_weapon->GetActiveConfig()->aimbot_fire_if_no_target)
46 | {
47 | INPUT input = { 0 };
48 | input.type = INPUT_MOUSE;
49 | input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
50 | SendInput(1, &input, sizeof(INPUT));
51 | input.mi.dwFlags = MOUSEEVENTF_LEFTUP;
52 | SendInput(1, &input, sizeof(INPUT));
53 | shot_fired = true;
54 | ptr_local_entity->t_shot_fired = std::clock();
55 | }
56 | }
57 |
58 | void Aimbot::SetInactive()
59 | {
60 | active_last_tick = false;
61 | }
62 |
63 | bool Aimbot::Search(int* id)
64 | {
65 | float diff = 99999.f;
66 | int target_id = -1;
67 |
68 | for (int i = 0; i <= 256; i++)
69 | {
70 | if ((ptr_entity_list + i) == 0) continue;
71 |
72 | if ((ptr_active_weapon->GetActiveConfig()->aimbot_friendly_fire || (ptr_entity_list + i)->team != ptr_local_entity->team) && (ptr_entity_list + i)->dormant == 0 && (ptr_entity_list + i)->life_state == LIFE_STATE_ALIVE && !(ptr_entity_list + i)->immune)
73 | {
74 | if (ptr_active_weapon->GetActiveConfig()->aimbot_visibility_check && !(ptr_entity_list + i)->spotted_by_local_entity) continue;
75 |
76 | float comp_val;
77 |
78 | comp_val = Vector::AxisFromVector(ptr_local_entity->origin_view - (ptr_entity_list + i)->origin_head).DistanceAbs(ptr_local_entity->local_view).Abs();
79 | if (comp_val < diff && comp_val < ptr_active_weapon->GetActiveConfig()->aimbot_field_of_view / 2.f)
80 | {
81 | target_id = i;
82 | diff = comp_val;
83 | }
84 | }
85 | }
86 |
87 | if (target_id == -1) return false;
88 | else
89 | {
90 | *id = target_id;
91 | return true;
92 | }
93 | }
--------------------------------------------------------------------------------
/hack/aimbot.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | class Aimbot
5 | {
6 | public:
7 | Aimbot();
8 | void Update();
9 | void SetInactive();
10 | private:
11 | bool active_last_tick;
12 | bool Search(int* id);
13 | bool shot_fired;
14 | };
--------------------------------------------------------------------------------
/hack/axis.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include "axis.h"
4 |
5 | Axis::Axis()
6 | {
7 | pitch = 0;
8 | yaw = 0;
9 | }
10 |
11 | Axis::Axis(float pitch, float yaw)
12 | {
13 | this->pitch = pitch;
14 | this->yaw = yaw;
15 | }
16 |
17 | float Axis::Abs()
18 | {
19 | return (float)sqrt(pitch * pitch + yaw * yaw);
20 | }
21 |
22 | Axis Axis::SubtractNorm(Axis b)
23 | {
24 | Axis diff;
25 | if (yaw > 90.f && b.yaw < -90.f) diff.yaw = b.yaw - yaw + 360.f;
26 | else diff.yaw = yaw - b.yaw;
27 |
28 | diff.pitch = pitch - b.pitch;
29 | if (diff.pitch > 88.f) diff.pitch = 88.f;
30 | if (diff.pitch < -88.f) diff.pitch = -88.f;
31 | return diff;
32 | }
33 |
34 | Axis Axis::Subtract(Axis b)
35 | {
36 | Axis diff;
37 | diff.yaw = yaw - b.yaw;
38 | diff.pitch = pitch - b.pitch;
39 | return diff;
40 | }
41 |
42 | Axis Axis::DistanceAbs(Axis b)
43 | {
44 | Axis diff;
45 |
46 | diff.yaw = std::abs(yaw - b.yaw);
47 | if (diff.yaw > 180.f) diff.yaw = 360.f - diff.yaw;
48 |
49 | diff.pitch = std::abs(pitch - b.pitch);
50 |
51 | return diff;
52 | }
53 |
54 | bool Axis::ReferenceEntityRightsided(Axis b)
55 | {
56 | float f = b.yaw - yaw;
57 | if (f < -180.f) f += 360.f;
58 | return f > 0;
59 | }
60 |
61 | bool Axis::ReferenceEntityHigher(Axis b)
62 | {
63 | return pitch < b.pitch;
64 | }
65 |
66 | void Axis::SubtractDirect(Axis b)
67 | {
68 | if (std::isnan(b.yaw) || std::isnan(b.pitch)) return;
69 |
70 | if (yaw > 90.f && b.yaw < -90.f) yaw = b.yaw - yaw + 360.f;
71 | else yaw -= b.yaw;
72 |
73 | if (pitch - b.pitch > 88.f) pitch = 88.f;
74 | else if (pitch - b.pitch < -88.f) pitch = -88.f;
75 | else pitch -= b.pitch;
76 | }
77 |
78 | Axis Axis::AddNorm(Axis b)
79 | {
80 | Axis sum;
81 | sum.pitch = pitch + b.pitch;
82 | if (sum.pitch > 180.f) sum.pitch -= 360;
83 | if (sum.pitch < 180.f) sum.pitch += 360;
84 |
85 | sum.yaw = yaw + b.yaw;
86 | if (sum.yaw > 89.f) sum.yaw = 89.f;
87 | if (sum.yaw < -89.f) sum.yaw = -89.f;
88 |
89 | return sum;
90 | }
91 |
92 | Axis Axis::Add(Axis b)
93 | {
94 | Axis sum;
95 | sum.yaw = yaw + b.yaw;
96 | sum.pitch = pitch + b.pitch;
97 | return sum;
98 | }
99 |
100 | void Axis::AddDirect(Axis b)
101 | {
102 | yaw += b.yaw;
103 | pitch += b.pitch;
104 | }
105 |
106 | Axis Axis::Multiply(float f)
107 | {
108 | return Axis(pitch * f, yaw * f);
109 | }
110 |
111 | void Axis::MultiplyDirect(float f)
112 | {
113 | pitch *= f;
114 | yaw *= f;
115 | }
--------------------------------------------------------------------------------
/hack/axis.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | class Axis
4 | {
5 | public:
6 | Axis();
7 | Axis(float pitch, float yaw);
8 |
9 | float Abs();
10 | Axis SubtractNorm(Axis b);
11 | Axis Subtract(Axis b);
12 | Axis DistanceAbs(Axis b);
13 | bool ReferenceEntityRightsided(Axis b);
14 | bool ReferenceEntityHigher(Axis b);
15 | void SubtractDirect(Axis b);
16 | Axis AddNorm(Axis b);
17 | Axis Add(Axis b);
18 | void AddDirect(Axis b);
19 | Axis Multiply(float f);
20 | void MultiplyDirect(float f);
21 | float pitch;
22 | float yaw;
23 | };
--------------------------------------------------------------------------------
/hack/button.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | struct Button
5 | {
6 | int key_code;
7 | bool last_tick_state, currently_pressed;
8 | bool active;
9 | bool hold;
10 |
11 | Button(int key_code, bool hold, bool active_from_start)
12 | {
13 | this->key_code = key_code;
14 | this->hold = hold;
15 | active = active_from_start;
16 | last_tick_state = false;
17 | currently_pressed = false;
18 | }
19 |
20 | void update(bool play_sound)
21 | {
22 | if (key_code == -1) return;
23 | currently_pressed = GetAsyncKeyState(key_code);
24 | if (hold)
25 | {
26 | active = currently_pressed;
27 | if (play_sound)
28 | {
29 | if (!last_tick_state && active) Beep(600, 200);
30 | else if (last_tick_state && !active) Beep(400, 200);
31 | }
32 | }
33 | else
34 | {
35 | if (currently_pressed && last_tick_state != currently_pressed)
36 | {
37 | active = !active;
38 | if (play_sound)
39 | {
40 | if (active) Beep(600, 200);
41 | else Beep(400, 200);
42 | }
43 | }
44 | }
45 | last_tick_state = currently_pressed;
46 | }
47 |
48 | void set_status(bool is_active)
49 | {
50 | active = is_active;
51 | }
52 |
53 | bool is_active()
54 | {
55 | return active;
56 | }
57 | };
--------------------------------------------------------------------------------
/hack/configuration.cpp:
--------------------------------------------------------------------------------
1 | #include "Configuration.h"
2 |
3 |
4 |
5 | Configuration::Configuration()
6 | {
7 | }
8 |
9 |
10 | Configuration::~Configuration()
11 | {
12 | }
13 |
--------------------------------------------------------------------------------
/hack/configuration.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | #include "glow_data.h"
5 | #include "button.h"
6 |
7 | constexpr short FOV_TYPE_DEGREE = 0;
8 | constexpr short FOV_TYPE_SOURCE_ENGINE_UNITS = 1;
9 |
10 | // KEY CODES https://msdn.microsoft.com/de-de/library/windows/desktop/dd375731(v=vs.85).aspx
11 |
12 | struct Configuration
13 | {
14 | bool variant_hold_key = true;
15 | bool variant_play_sound = false;
16 | short variant_key = -1;
17 | Button button_variant = Button(variant_key, variant_hold_key, 0);
18 |
19 | int load_config_key = 0x2D;
20 | int panic_key = 0x23;
21 | Button button_load_config = Button(load_config_key, true, false);
22 | Button button_panic = Button(panic_key, true, false);
23 | bool activate_console = true;
24 | bool hide_console_after_startup = false;
25 | int sync_break = 10;
26 |
27 | bool aim_assist_on = false;
28 | int aim_assist_key = VK_F5;
29 | bool aim_assist_hold_key = false;
30 | bool aim_assist_play_sound = false;
31 | int aim_assist_field_of_view_type = FOV_TYPE_DEGREE;
32 | float aim_assist_field_of_view = 10.f;
33 | float aim_assist_tracking_speed = 0.f;
34 | float aim_assist_tracking_speed_fire = 0.20f;
35 | float aim_assist_curb_zone = 2.f;
36 | float aim_assist_punch = 1.f;
37 | float aim_assist_distance_reduction = 1.f;
38 | float aim_assist_maximum_velocity = 300.f;
39 | bool aim_assist_linear_velocity_mapping = true;
40 | bool aim_assist_stick_to_target = false;
41 | bool aim_assist_visibility_check = true;
42 | bool aim_assist_friendly_fire = false;
43 | bool aim_assist_force_headshot = false;
44 | int aim_assist_force_body_after_shots = 150;
45 | int aim_assist_jump_delay = 0;
46 | int aim_assist_crouch_delay = 0;
47 | int aim_assist_movement_prediction = 0;
48 | int aim_assist_transfer_pause = 0;
49 | int aim_assist_fire_pause = 0;
50 | float aim_assist_pause_range_extension = 0.f;
51 | int aim_assist_spot_delay = 0;
52 | int aim_assist_activation_softening = 0;
53 | Button button_aim_assist = Button(aim_assist_key, aim_assist_hold_key, aim_assist_on);
54 |
55 | bool triggerbot_on = false;
56 | int triggerbot_key = VK_F6;
57 | bool triggerbot_hold_key = true;
58 | bool triggerbot_play_sound = false;
59 | int triggerbot_key_spraydown = 0x06;
60 | int triggerbot_mode = 0;
61 | int triggerbot_pause_after_shot = 0;
62 | float triggerbot_pause_range_extension_factor = 0.f;
63 | int triggerbot_fake_shot_duration = 200;
64 | int triggerbot_fire_extension = 200;
65 | int triggerbot_delay = 0;
66 | float triggerbot_maximum_distance = 7000.f;
67 | float triggerbot_maximum_velocity = 270.f;
68 | bool triggerbot_disable_while_entering_scope = false;
69 | bool triggerbot_enable_in_scope_only = false;
70 | bool triggerbot_head_only = false;
71 | bool triggerbot_friendly_fire = false;
72 | bool triggerbot_visibility_check = true;
73 | Button button_triggerbot = Button(triggerbot_key, triggerbot_hold_key, triggerbot_on);
74 | Button button_triggerbot_spraydown = Button(triggerbot_key_spraydown, triggerbot_hold_key, triggerbot_on);
75 |
76 | bool glow_esp_on = false;
77 | int glow_esp_key = VK_F7;
78 | bool glow_esp_hold_key = false;
79 | bool glow_esp_play_sound = true;
80 | bool glow_esp_toggle_for_all_weapons = true;
81 | bool glow_esp_spotted_only = false;
82 | bool glow_esp_distinct_colors = false;
83 | float glow_esp_distinct_mix_factor = 1.f;
84 | long long glow_esp_rgba_friendly = 0x0078FFC8;
85 | long long glow_esp_rgba_friendly_1hp = 0xFF000008C;
86 | long long glow_esp_rgba_hostile = 0xFFFFFF8C;
87 | long long glow_esp_rgba_hostile_1hp = 0xFF000008C;
88 | long long glow_esp_rgba_weapon = 0x7045E6BE;
89 | long long glow_esp_rgba_grenade = 0xC245E6A0;
90 | long long glow_esp_rgba_bomb = 0xF48071FF;
91 | long long glow_esp_rgba_money = 0x44AA00A0;
92 | Button button_glow_esp = Button(glow_esp_key, glow_esp_hold_key, glow_esp_on);
93 |
94 | bool rcs_on = false;
95 | int rcs_key = VK_F8;
96 | bool rcs_hold_key = false;
97 | bool rcs_play_sound = true;
98 | float rcs_reduction_factor = 0.70f;
99 | int rcs_sync_pause = 20;
100 | Button button_rcs = Button(rcs_key, rcs_hold_key, rcs_on);
101 |
102 | bool aimbot_on = false;
103 | int aimbot_key = 0x64;
104 | bool aimbot_hold_key = true;
105 | bool aimbot_play_sound = false;
106 | float aimbot_field_of_view = 10.f;
107 | bool aimbot_single_shot = false;
108 | bool aimbot_fire_if_no_target = false;
109 | bool aimbot_visibility_check = true;
110 | bool aimbot_friendly_fire = false;
111 | Button button_aimbot = Button(aimbot_key, aimbot_hold_key, aimbot_on);
112 |
113 | GlowData glow_team = GlowData(glow_esp_rgba_friendly);
114 | GlowData glow_team_1hp = GlowData(glow_esp_rgba_friendly_1hp);
115 | GlowData glow_hostile = GlowData(glow_esp_rgba_hostile);
116 | GlowData glow_hostile_1hp = GlowData(glow_esp_rgba_hostile_1hp);
117 | GlowData glow_weapon = GlowData(glow_esp_rgba_weapon);
118 | GlowData glow_grenade = GlowData(glow_esp_rgba_grenade);
119 | GlowData glow_bomb = GlowData(glow_esp_rgba_bomb);
120 | GlowData glow_money = GlowData(glow_esp_rgba_money);
121 | std::vector distinct_colors{ GlowData(0xFFF700AA), GlowData(0x7B00FFAA), GlowData(0x00FF09AA), GlowData(0x00D6FFAA), GlowData(0xFFFFFFAA) };
122 |
123 | void updateConfigurationObjects()
124 | {
125 | glow_team = GlowData(glow_esp_rgba_friendly);
126 | glow_team_1hp = GlowData(glow_esp_rgba_friendly_1hp);
127 | glow_hostile = GlowData(glow_esp_rgba_hostile);
128 | glow_hostile_1hp = GlowData(glow_esp_rgba_hostile_1hp);
129 | glow_weapon = GlowData(glow_esp_rgba_weapon);
130 | glow_grenade = GlowData(glow_esp_rgba_grenade);
131 | glow_bomb = GlowData(glow_esp_rgba_bomb);
132 | glow_money = GlowData(glow_esp_rgba_money);
133 |
134 | button_variant = Button(variant_key, variant_hold_key, 0);
135 | button_load_config = Button(load_config_key, true, false);
136 | button_aim_assist = Button(aim_assist_key, aim_assist_hold_key, aim_assist_on);
137 | button_glow_esp = Button(glow_esp_key, glow_esp_hold_key, glow_esp_on);
138 | button_triggerbot = Button(triggerbot_key, triggerbot_hold_key, triggerbot_on);
139 | button_triggerbot_spraydown = Button(triggerbot_key_spraydown, triggerbot_hold_key, triggerbot_on);
140 | button_aimbot = Button(aimbot_key, aimbot_hold_key, aimbot_on);
141 | button_rcs = Button(rcs_key, rcs_hold_key, rcs_on);
142 | }
143 | };
--------------------------------------------------------------------------------
/hack/control.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 |
4 | #include "equipment.h"
5 | #include "weapon.h"
6 | #include "control.h"
7 | #include "glow.h"
8 | #include "parser.h"
9 | #include "utility.h"
10 |
11 | Control::Control()
12 | {
13 | weapon_item_index_last_tick = 0;
14 | InitializeControl();
15 | }
16 |
17 | void Control::Sync()
18 | {
19 | if (weapon_item_index_last_tick != ptr_active_weapon->item_index) InitializeControl();
20 |
21 | for (Configuration& c : ptr_active_weapon->configs) c.button_variant.update(c.variant_play_sound);
22 |
23 | SyncAimbot();
24 | SyncAimAssist();
25 | SyncRCS();
26 | SyncGlowESP();
27 | SyncTriggerbot();
28 |
29 | weapon_item_index_last_tick = ptr_active_weapon->item_index;
30 | }
31 |
32 | void Control::SyncUtilityThread()
33 | {
34 | while (true)
35 | {
36 | LoadConfig();
37 | SyncPanic();
38 | std::this_thread::sleep_for(std::chrono::milliseconds(100));
39 | }
40 | }
41 |
42 | void Control::InitializeControl()
43 | {
44 | aim_assist = AimAssist();
45 | recoil_reduction = RecoilControl();
46 | trigger_bot = Triggerbot();
47 | glow = Glow();
48 | aimbot = Aimbot();
49 | }
50 |
51 | void Control::SyncAimAssist()
52 | {
53 | if (!ptr_active_weapon->GetActiveConfig()->aim_assist_on) return;
54 | ptr_active_weapon->GetActiveConfig()->button_aim_assist.update(ptr_active_weapon->GetActiveConfig()->aim_assist_play_sound);
55 | if (ptr_active_weapon->GetActiveConfig()->button_aim_assist.is_active()) aim_assist.Activate();
56 | else aim_assist.Reset();
57 | }
58 |
59 | void Control::SyncRCS()
60 | {
61 | if (!ptr_active_weapon->GetActiveConfig()->rcs_on) return;
62 | ptr_active_weapon->GetActiveConfig()->button_rcs.update(ptr_active_weapon->GetActiveConfig()->rcs_play_sound);
63 | if (ptr_active_weapon->GetActiveConfig()->button_rcs.is_active()) recoil_reduction.Activate();
64 | else recoil_reduction.Reset();
65 | }
66 |
67 | void Control::SyncGlowESP()
68 | {
69 | if (!ptr_active_weapon->GetActiveConfig()->glow_esp_on) return;
70 | ptr_active_weapon->GetActiveConfig()->button_glow_esp.update(ptr_active_weapon->GetActiveConfig()->glow_esp_play_sound);
71 | if (ptr_active_weapon->GetActiveConfig()->glow_esp_toggle_for_all_weapons) for (Weapon& weapon : equipment.weapons) for (Configuration& c : weapon.configs) c.button_glow_esp.set_status(ptr_active_weapon->GetActiveConfig()->button_glow_esp.is_active());
72 | if (ptr_active_weapon->GetActiveConfig()->button_glow_esp.is_active()) glow.Activate();
73 | else glow.Reset();
74 | }
75 |
76 | void Control::SyncTriggerbot()
77 | {
78 | if (!ptr_active_weapon->GetActiveConfig()->triggerbot_on) return;
79 | ptr_active_weapon->GetActiveConfig()->button_triggerbot.update(ptr_active_weapon->GetActiveConfig()->triggerbot_play_sound);
80 | ptr_active_weapon->GetActiveConfig()->button_triggerbot_spraydown.update(ptr_active_weapon->GetActiveConfig()->triggerbot_play_sound);
81 | if (ptr_active_weapon->GetActiveConfig()->button_triggerbot.is_active()) trigger_bot.Activate(false);
82 | else if (ptr_active_weapon->GetActiveConfig()->button_triggerbot_spraydown.is_active()) trigger_bot.Activate(true);
83 | }
84 |
85 | void Control::SyncAimbot()
86 | {
87 | if (!ptr_active_weapon->GetActiveConfig()->aimbot_on) return;
88 | ptr_active_weapon->GetActiveConfig()->button_aimbot.update(ptr_active_weapon->GetActiveConfig()->aimbot_play_sound);
89 | if (ptr_active_weapon->GetActiveConfig()->button_aimbot.is_active()) aimbot.Update();
90 | else aimbot.SetInactive();
91 | }
92 |
93 | void Control::LoadConfig()
94 | {
95 | ptr_active_weapon->GetActiveConfig()->button_load_config.update(false);
96 | if (ptr_active_weapon->GetActiveConfig()->button_load_config.is_active() && Utility::ClockDiff(std::clock(), t_last_config_update) > 3000)
97 | {
98 | Beep(400, 200);
99 | Parser::ReadConfig();
100 | glow.Reset();
101 | InitializeControl();
102 | t_last_config_update = std::clock();
103 | }
104 | }
105 |
106 | void Control::SyncPanic()
107 | {
108 | ptr_active_weapon->GetActiveConfig()->button_panic.update(false);
109 | if (ptr_active_weapon->GetActiveConfig()->button_panic.is_active()) exit(0);
110 | }
--------------------------------------------------------------------------------
/hack/control.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "aim_assist.h"
3 | #include "aimbot.h"
4 | #include "recoil_control.h"
5 | #include "triggerbot.h"
6 | #include "glow.h"
7 |
8 | class Control
9 | {
10 | public:
11 | Control();
12 | void Sync();
13 | void SyncUtilityThread();
14 | private:
15 | void SyncAimbot();
16 | void SyncAimAssist();
17 | void SyncRCS();
18 | void SyncGlowESP();
19 | void SyncTriggerbot();
20 |
21 | void LoadConfig();
22 | void SyncPanic();
23 |
24 | void InitializeControl();
25 |
26 | short weapon_item_index_last_tick;
27 |
28 | AimAssist aim_assist;
29 | Aimbot aimbot;
30 | RecoilControl recoil_reduction;
31 | Triggerbot trigger_bot;
32 | Glow glow;
33 |
34 | std::clock_t t_last_config_update;
35 | };
--------------------------------------------------------------------------------
/hack/entity.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include "entity.h"
4 | #include "vector.h"
5 | #include "axis.h"
6 | #include "utility.h"
7 |
8 | Entity::Entity()
9 | {
10 | entity_base = 0;
11 | active_weapon_entity = 0;
12 | t_spot_local_entity = std::clock();
13 | t_spot_team = std::clock();
14 | init = false;
15 | player = false;
16 | active_weapon_item_index = 0;
17 | armor = 0;
18 | armored = 0;
19 | ammunition = 0;
20 | class_id = 0;
21 | color_id = 0;
22 | crosshair_id = 0;
23 | crouching = 0;
24 | dormant = 1;
25 | health = 100;
26 | id = 0;
27 | immune = 0;
28 | in_scope = 0;
29 | last_weapon_item_index = 0;
30 | life_state = 1;
31 | on_ground = 1;
32 | reloading = 0;
33 | shots_fired = 0;
34 | shots_fired_last_tick = 0;
35 | spotted_by = 0;
36 | spotted_by_local_entity = 0;
37 | t_acceleration_initiated = std::clock();
38 | t_crouching = std::clock();
39 | t_deceleration_initiated = std::clock();
40 | t_move_registered = std::clock();
41 | t_last_weapon_change = std::clock();
42 | t_not_in_scope = std::clock();
43 | t_on_ground = std::clock();
44 | t_shot_fired = std::clock();
45 | team = 1;
46 | velocity = 0;
47 | }
48 |
49 | void Entity::Update(int index, int* hostile_id)
50 | {
51 | id = index;
52 | if (!Memory::GetValidEntity(index, &entity_base))
53 | {
54 | init = false;
55 | return;
56 | }
57 | init = true;
58 |
59 | Memory::GetEntityClassID(entity_base, &class_id);
60 | if (class_id != 40)
61 | {
62 | player = false;
63 | return;
64 | }
65 |
66 | player = true;
67 |
68 | Memory::Get(entity_base, ptr_offset->dormant, &dormant);
69 | Memory::Get(entity_base, ptr_offset->health, &health);
70 | Memory::Get(entity_base, ptr_offset->life_state, &life_state);
71 | Memory::Get(entity_base, ptr_offset->team_num, &team);
72 | Memory::Get(entity_base, ptr_offset->crosshair_id, &crosshair_id);
73 |
74 | if (ptr_local_entity != nullptr && team != ptr_local_entity->team)
75 | {
76 | *hostile_id++;
77 | color_id = *hostile_id % 5;
78 | }
79 | else color_id = -1;
80 |
81 | bool last_tick_sbt = spotted_by != 0;
82 | bool last_tick_sble = spotted_by_local_entity;
83 |
84 | Memory::Get(entity_base, ptr_offset->spotted_by_mask, &spotted_by);
85 | std::bitset<32> bits(spotted_by);
86 | if (ptr_local_entity != nullptr) spotted_by_local_entity = bits[ptr_local_entity->id - 1] != 0;
87 |
88 | if (!last_tick_sble && spotted_by_local_entity) t_spot_local_entity = std::clock();
89 | if (!last_tick_sbt && spotted_by != 0) t_spot_team = std::clock();
90 |
91 | shots_fired_last_tick = shots_fired;
92 | Memory::Get(entity_base, ptr_offset->shots_fired, &shots_fired);
93 | if (shots_fired > 0) t_shot_fired = std::clock();
94 | Memory::Get(entity_base, ptr_offset->armor_value, &armor);
95 | armored = armor > 0;
96 | Memory::Get(entity_base, ptr_offset->gun_game_immunity, &immune);
97 | Memory::Get(entity_base, ptr_offset->is_scoped, &in_scope);
98 | if (!in_scope) t_not_in_scope = std::clock();
99 |
100 | int flags;
101 | Memory::Get(entity_base, ptr_offset->flags, &flags);
102 |
103 | bool on_ground_last_tick = on_ground;
104 | bool crouching_last_tick = crouching;
105 |
106 | on_ground = flags & 1 << 0;
107 | crouching = flags & 1 << 1;
108 |
109 | if (crouching_last_tick != crouching) t_crouching = std::clock();
110 | if (on_ground_last_tick != on_ground) t_on_ground = std::clock();
111 |
112 | Memory::Get(entity_base, ptr_offset->vec_origin, &origin);
113 | Memory::Get(entity_base, ptr_offset->vec_velocity, &velocity_vector);
114 |
115 | float velocity_last_tick = velocity;
116 | velocity = velocity_vector.Abs();
117 |
118 | if (velocity_last_tick < 5.f && velocity >= 5.f) t_acceleration_initiated = std::clock();
119 | if (velocity_last_tick >= 180.f && velocity < 180.f) t_deceleration_initiated = std::clock();
120 |
121 | Memory::GetBoneMatrixVector(entity_base, HEAD, &origin_head);
122 | Memory::GetBoneMatrixVector(entity_base, CHEST, &origin_chest);
123 | Memory::GetBoneMatrixVector(entity_base, STOMACH, &origin_stomach);
124 |
125 | DWORD active_weapon_handle;
126 | Memory::Get(entity_base, ptr_offset->active_weapon, &active_weapon_handle);
127 | Memory::GetEntityFromHandle(active_weapon_handle, &active_weapon_entity);
128 | Memory::Get(active_weapon_entity, ptr_offset->item_definition_index, &active_weapon_item_index);
129 |
130 | if (active_weapon_item_index != last_weapon_item_index) t_last_weapon_change = std::clock();
131 | last_weapon_item_index = active_weapon_item_index;
132 |
133 | if (Memory::GetLocalEntity(entity_base))
134 | {
135 | ptr_local_entity = this;
136 | Memory::Get(active_weapon_entity, ptr_offset->in_reload, &reloading);
137 | Memory::Get(active_weapon_entity, ptr_offset->clip, &ammunition);
138 | Memory::GetViewAngle(&local_view);
139 | Memory::Get(entity_base, ptr_offset->aim_punch_angle, &local_punch);
140 | Memory::Get(entity_base, ptr_offset->aim_punch_angle_vel, &local_punch_velocity);
141 |
142 | Vector view_offset;
143 | Memory::Get(entity_base, ptr_offset->vec_view_offset, &view_offset);
144 | origin_view = origin + view_offset;
145 |
146 | if (local_view_last_tick.pitch != local_view.pitch || local_view_last_tick.yaw != local_view.yaw ||
147 | origin_last_tick.x != origin.x || origin_last_tick.y != origin.y || origin_last_tick.z != origin.z) t_move_registered = std::clock();
148 |
149 | local_view_last_tick = local_view;
150 | origin_last_tick = origin;
151 | }
152 | }
153 |
154 | DWORD Entity::GetEntityBase()
155 | {
156 | return entity_base;
157 | }
158 |
159 | DWORD Entity::GetWeaponEntity()
160 | {
161 | return active_weapon_entity;
162 | }
--------------------------------------------------------------------------------
/hack/entity.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | #include "memory.h"
5 | #include "offsets.h"
6 | #include "vector.h"
7 | #include "axis.h"
8 |
9 | constexpr short LIFE_STATE_ALIVE = 0;
10 | constexpr short LIFE_STATE_DYING = 1;
11 | constexpr short LIFE_STATE_DEAD = 2;
12 |
13 | constexpr short HEAD = 8;
14 | constexpr short CHEST = 6;
15 | constexpr short STOMACH = 3;
16 |
17 | class Entity
18 | {
19 | public:
20 | Entity();
21 | bool init;
22 | bool player;
23 |
24 | void Update(int index, int* hostile_id);
25 |
26 | int id;
27 | int color_id;
28 | int class_id;
29 |
30 | int health;
31 | int life_state;
32 | int team;
33 | int crosshair_id;
34 | int dormant;
35 | int spotted_by;
36 | bool spotted_by_local_entity;
37 | short active_weapon_item_index;
38 |
39 | int shots_fired;
40 | int shots_fired_last_tick;
41 |
42 | int armor;
43 | bool armored;
44 | bool immune;
45 | bool in_scope;
46 |
47 | bool on_ground;
48 | bool crouching;
49 | std::clock_t t_on_ground;
50 | std::clock_t t_crouching;
51 |
52 | std::clock_t t_acceleration_initiated;
53 | std::clock_t t_deceleration_initiated;
54 |
55 | std::clock_t t_spot_local_entity;
56 | std::clock_t t_spot_team;
57 | std::clock_t t_not_in_scope;
58 | std::clock_t t_shot_fired;
59 |
60 | std::clock_t t_last_weapon_change;
61 | short last_weapon_item_index;
62 |
63 | Vector origin;
64 | Vector origin_head;
65 | Vector origin_chest;
66 | Vector origin_stomach;
67 |
68 | Vector origin_key;
69 | Vector origin_head_key;
70 | Vector origin_chest_key;
71 | Vector origin_stomach_key;
72 |
73 | Vector velocity_vector;
74 | float velocity;
75 |
76 | Axis local_view;
77 | Axis local_punch;
78 | Axis local_punch_velocity;
79 | Vector origin_view;
80 |
81 | Axis local_view_last_tick;
82 | Vector origin_last_tick;
83 | bool reloading;
84 | int ammunition;
85 |
86 | std::clock_t t_move_registered;
87 |
88 | DWORD GetEntityBase();
89 | DWORD GetWeaponEntity();
90 |
91 | private:
92 | DWORD entity_base;
93 | DWORD active_weapon_entity;
94 | };
95 |
96 | extern Entity* ptr_local_entity;
97 | extern Entity* ptr_entity_list;
--------------------------------------------------------------------------------
/hack/equipment.cpp:
--------------------------------------------------------------------------------
1 | #include "equipment.h"
2 | #include "entity.h"
3 |
4 | Equipment::Equipment()
5 | {
6 | weapons.push_back(Weapon(DEAGLE, PISTOL, 1, 1100));
7 | weapons.push_back(Weapon(BERETTAS, PISTOL, 2, 1050));
8 | weapons.push_back(Weapon(FIVESEVEN, PISTOL, 3, 1000));
9 | weapons.push_back(Weapon(GLOCK18, PISTOL, 4, 1100));
10 | weapons.push_back(Weapon(AK47, ASSAULT_RIFLE, 7, 980));
11 | weapons.push_back(Weapon(AUG, ASSAULT_RIFLE, 8, 1170));
12 | weapons.push_back(Weapon(AWP, SNIPER_RIFLE, 9, 1250));
13 | weapons.push_back(Weapon(FAMAS, ASSAULT_RIFLE, 10, 1000));
14 | weapons.push_back(Weapon(G3SG1, SNIPER_RIFLE, 11, 1000));
15 | weapons.push_back(Weapon(GALILAR, ASSAULT_RIFLE, 13, 1110));
16 | weapons.push_back(Weapon(M249, MACHINE_GUN, 14, 1130));
17 | weapons.push_back(Weapon(M4A4, ASSAULT_RIFLE, 16, 1110));
18 | weapons.push_back(Weapon(MAC10, SUBMACHINE_GUN, 17, 980));
19 | weapons.push_back(Weapon(P90, SUBMACHINE_GUN, 19, 930));
20 | weapons.push_back(Weapon(MP5SD, SUBMACHINE_GUN, 23, 1100));
21 | weapons.push_back(Weapon(UMP45, SUBMACHINE_GUN, 24, 1030));
22 | weapons.push_back(Weapon(XM1014, SHOTGUN, 25, 970));
23 | weapons.push_back(Weapon(BIZON, SUBMACHINE_GUN, 26, 1100));
24 | weapons.push_back(Weapon(MAG7, SHOTGUN, 27, 930));
25 | weapons.push_back(Weapon(NEGEV, MACHINE_GUN, 28, 1080));
26 | weapons.push_back(Weapon(SAWEDOFF, SHOTGUN, 29, 1070));
27 | weapons.push_back(Weapon(TEC9, PISTOL, 30, 970));
28 | weapons.push_back(Weapon(TASER, PISTOL, 31, 0));
29 | weapons.push_back(Weapon(P2000, PISTOL, 32, 970));
30 | weapons.push_back(Weapon(MP7, SUBMACHINE_GUN, 33, 1000));
31 | weapons.push_back(Weapon(MP9, SUBMACHINE_GUN, 34, 1280));
32 | weapons.push_back(Weapon(NOVA, SHOTGUN, 35, 1020));
33 | weapons.push_back(Weapon(P250, PISTOL, 36, 970));
34 | weapons.push_back(Weapon(SCAR20, SNIPER_RIFLE, 38, 1000));
35 | weapons.push_back(Weapon(SG553, ASSAULT_RIFLE, 39, 950));
36 | weapons.push_back(Weapon(SSG08, SNIPER_RIFLE, 40, 970));
37 | weapons.push_back(Weapon(KNIFE_CT, KNIFE, 42, 0));
38 | weapons.push_back(Weapon(FLASHBANG, GRENADE, 43, 0));
39 | weapons.push_back(Weapon(HEGRENADE, GRENADE, 44, 0));
40 | weapons.push_back(Weapon(SMOKEGRENADE, GRENADE, 45, 0));
41 | weapons.push_back(Weapon(MOLOTOV, GRENADE, 46, 0));
42 | weapons.push_back(Weapon(DECOY, GRENADE, 47, 0));
43 | weapons.push_back(Weapon(INCGRENADE, GRENADE, 48, 0));
44 | weapons.push_back(Weapon(C4, BOMB, 49, 0));
45 | weapons.push_back(Weapon(HEALTHSHOT, UTILITY, 57, 0));
46 | weapons.push_back(Weapon(KNIFE_T, KNIFE, 59, 0));
47 | weapons.push_back(Weapon(M4A1S, ASSAULT_RIFLE, 60, 1110));
48 | weapons.push_back(Weapon(USPS, PISTOL, 61, 980));
49 | weapons.push_back(Weapon(CZ75A, PISTOL, 63, 1830));
50 | weapons.push_back(Weapon(REVOLVER, PISTOL, 64, 1300));
51 | }
52 |
53 | void Equipment::UpdateActiveWeapon()
54 | {
55 | for (unsigned int k = 0; k < weapons.size(); k++)
56 | {
57 | if (weapons.at(k).item_index == ptr_local_entity->active_weapon_item_index)
58 | {
59 | ptr_active_weapon = &weapons[k];
60 | return;
61 | }
62 | }
63 | }
--------------------------------------------------------------------------------
/hack/equipment.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "weapon.h"
3 |
4 | struct Equipment
5 | {
6 | Equipment();
7 | void UpdateActiveWeapon();
8 | std::vector weapons;
9 | };
10 |
11 | extern Equipment equipment;
--------------------------------------------------------------------------------
/hack/glow.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include "glow.h"
4 | #include "offsets.h"
5 | #include "weapon.h"
6 | #include "utility.h"
7 |
8 | constexpr short C_INVALID = 0;
9 | constexpr short C_PLAYER = 1;
10 | constexpr short C_WEAPON = 2;
11 | constexpr short C_GRENADE = 3;
12 | constexpr short C_OBJECTIVE = 4;
13 | constexpr short C_MONEY = 6;
14 |
15 | Glow::Glow()
16 | {
17 | }
18 |
19 | void Glow::Activate()
20 | {
21 |
22 | // int32_t m_nNextFreeSlot; 0x0000
23 | // uint32_t pEntity; 0x0004
24 | // float R; 0x0008
25 | // float G; 0x000C
26 | // float B; 0x0010
27 | // float A; 0x0014
28 | // char pad_0018[4]; 0x0018
29 | // float flUnk; 0x001C
30 | // float flBloom; 0x0020
31 | // float localplayeriszeropoint3; 0x0024
32 | // bool m_bRenderWhenOccluded; 0x0028
33 | // bool m_bRenderWhenUnoccluded; 0x0029
34 | // bool m_bFullBloomRender; 0x002A
35 | // char pad_002B[1]; 0x002B
36 | // int32_t m_nFullBloomStencilTestValue; 0x002C
37 | // int32_t iUnk; 0x0030
38 | // int32_t m_nSplitScreenSlot; 0x0034
39 | // size: 0x0038
40 |
41 | if (ptr_local_entity == nullptr) return;
42 | int object_count = Memory::GetGlowObjectManagerSize();
43 |
44 | for (int k = 0; k < object_count; k++)
45 | {
46 | DWORD ptr_glow_object = Memory::GetGlowObject(k);
47 |
48 | DWORD player_entity = *(DWORD*)(ptr_glow_object + 0x4);
49 | if (player_entity == 0) continue;
50 |
51 | int class_id = -1;
52 | Memory::GetEntityClassID(player_entity, &class_id);
53 |
54 | if (GetIdType(class_id) == C_PLAYER)
55 | {
56 | if (ptr_active_weapon->GetActiveConfig()->glow_esp_spotted_only && ptr_local_entity->life_state != LIFE_STATE_DEAD)
57 | {
58 | int spotted_by;
59 | Memory::Get(player_entity, ptr_offset->spotted_by_mask, &spotted_by);
60 | std::bitset<32> bits(spotted_by);
61 | if (bits[ptr_local_entity->id - 1] == 0) continue;
62 | }
63 |
64 | int team;
65 | Memory::Get(player_entity, ptr_offset->team_num, &team);
66 |
67 | GlowData mixed_glow(0x0), glow_100hp(0x0), glow_1hp(0x0);
68 |
69 | if (team == ptr_local_entity->team)
70 | {
71 | glow_100hp = ptr_active_weapon->GetActiveConfig()->glow_team;
72 | glow_1hp = ptr_active_weapon->GetActiveConfig()->glow_team_1hp;
73 | }
74 | else
75 | {
76 | glow_100hp = ptr_active_weapon->GetActiveConfig()->glow_hostile;
77 | glow_1hp = ptr_active_weapon->GetActiveConfig()->glow_hostile_1hp;
78 | }
79 |
80 | int health;
81 | Memory::Get(player_entity, ptr_offset->health, &health);
82 | float h = static_cast(health) / 100.f;
83 |
84 | int color;
85 | ProcessEntity(player_entity, &color);
86 |
87 | if (team != ptr_local_entity->team && ptr_active_weapon->GetActiveConfig()->glow_esp_distinct_colors && ptr_active_weapon->GetActiveConfig()->distinct_colors.size() > 0)
88 | {
89 | h = (1.f - ptr_active_weapon->GetActiveConfig()->glow_esp_distinct_mix_factor) * h + ptr_active_weapon->GetActiveConfig()->glow_esp_distinct_mix_factor;
90 | mixed_glow.red = ptr_active_weapon->GetActiveConfig()->distinct_colors.at(color).red * h + glow_1hp.red * (1.f - h);
91 | mixed_glow.green = ptr_active_weapon->GetActiveConfig()->distinct_colors.at(color).green * h + glow_1hp.green * (1.f - h);
92 | mixed_glow.blue = ptr_active_weapon->GetActiveConfig()->distinct_colors.at(color).blue * h + glow_1hp.blue * (1.f - h);
93 | mixed_glow.alpha = ptr_active_weapon->GetActiveConfig()->distinct_colors.at(color).alpha * h + glow_1hp.alpha * (1.f - h);
94 | }
95 | else
96 | {
97 | mixed_glow.red = glow_100hp.red * h + glow_1hp.red * (1.f - h);
98 | mixed_glow.green = glow_100hp.green * h + glow_1hp.green * (1.f - h);
99 | mixed_glow.blue = glow_100hp.blue * h + glow_1hp.blue * (1.f - h);
100 | mixed_glow.alpha = glow_100hp.alpha * h + glow_1hp.alpha * (1.f - h);
101 | }
102 |
103 | Memory::SetGlowData(ptr_glow_object, mixed_glow, true);
104 |
105 | }
106 | else if (GetIdType(class_id) == C_WEAPON) Memory::SetGlowData(ptr_glow_object, ptr_active_weapon->GetActiveConfig()->glow_weapon, true);
107 | else if (GetIdType(class_id) == C_GRENADE) Memory::SetGlowData(ptr_glow_object, ptr_active_weapon->GetActiveConfig()->glow_grenade, true);
108 | else if (GetIdType(class_id) == C_OBJECTIVE) Memory::SetGlowData(ptr_glow_object, ptr_active_weapon->GetActiveConfig()->glow_bomb, true);
109 | else if (GetIdType(class_id) == C_MONEY) Memory::SetGlowData(ptr_glow_object, GlowData(0x00FF00FF), true);
110 | }
111 | }
112 |
113 | void Glow::Reset()
114 | {
115 | if (ptr_local_entity == 0) return;
116 | int object_count = Memory::GetGlowObjectManagerSize();
117 | GlowData standard = GlowData(0x00000000);
118 |
119 | for (int k = 0; k < object_count; k++)
120 | {
121 | DWORD glow_object = Memory::GetGlowObject(k);
122 |
123 | DWORD player_entity = *(DWORD*)(glow_object + 0x4);
124 | if (player_entity == 0) continue;
125 |
126 | int class_id = -1;
127 | Memory::GetEntityClassID(player_entity, &class_id);
128 |
129 | if (GetIdType(class_id) == C_PLAYER ||
130 | GetIdType(class_id) == C_WEAPON ||
131 | GetIdType(class_id) == C_GRENADE ||
132 | GetIdType(class_id) == C_OBJECTIVE) Memory::SetGlowData(glow_object, standard, true);
133 | }
134 |
135 | buffer.clear();
136 | }
137 |
138 | int Glow::GetIdType(int classId)
139 | {
140 | // sv_dump_class_info
141 | if (classId == 40) return C_PLAYER;
142 | // AK47, Deagle, Rest
143 | else if (classId == 1 || classId == 46 || (classId >= 231 && classId <= 272)) return C_WEAPON;
144 | // decoy, flashbang, high explosive, incendiary, molotov, smoke
145 | else if (classId == 47 || classId == 77 || classId == 96 || classId == 99 || classId == 112 || classId == 155) return GRENADE;
146 | // bomb, bomb planted, hostage
147 | else if (classId == 34 || classId == 128 || classId == 97) return C_OBJECTIVE;
148 | else if (classId == 105) return C_MONEY;
149 | else return C_INVALID;
150 | }
151 |
152 | void Glow::ProcessEntity(DWORD player_entity, int* color)
153 | {
154 | for (unsigned int i = 0; i < buffer.size(); i++)
155 | {
156 | if (buffer.at(i).ptr_entity == player_entity)
157 | {
158 | *color = buffer.at(i).color_id;
159 | return;
160 | }
161 | }
162 | unsigned int color_id;
163 | if (buffer.size() != 0) color_id = buffer.back().color_id + 1;
164 | else color_id = 0;
165 | if (color_id == ptr_active_weapon->GetActiveConfig()->distinct_colors.size()) color_id = 0;
166 | buffer.push_back(BufferElement(player_entity, color_id));
167 | *color = color_id;
168 | }
--------------------------------------------------------------------------------
/hack/glow.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "memory.h"
3 | #include "entity.h"
4 | #include "configuration.h"
5 |
6 | struct BufferElement
7 | {
8 | BufferElement()
9 | {
10 | ptr_entity = 0;
11 | color_id = -1;
12 | }
13 |
14 | BufferElement(DWORD player_entity, int color)
15 | {
16 | ptr_entity = player_entity;
17 | color_id = color;
18 | }
19 |
20 | DWORD ptr_entity;
21 | int color_id;
22 | };
23 |
24 | class Glow
25 | {
26 | public:
27 | Glow();
28 | void Activate();
29 | void Reset();
30 | private:
31 | int GetIdType(int classId);
32 |
33 | std::vector buffer;
34 | void ProcessEntity(DWORD ptr_entity, int* color);
35 | };
--------------------------------------------------------------------------------
/hack/glow_data.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | struct GlowData
4 | {
5 | float red, green, blue, alpha;
6 |
7 | GlowData(long long color_hex)
8 | {
9 | red = ((color_hex >> 24) & 0xFF) / 255.f;
10 | green = ((color_hex >> 16) & 0xFF) / 255.f;
11 | blue = ((color_hex >> 8) & 0xFF) / 255.f;
12 | alpha = (color_hex & 0xFF) / 255.f;
13 | }
14 | };
--------------------------------------------------------------------------------
/hack/hack.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 | 15.0
23 | {5720BD26-8B8E-458C-944F-979A41900164}
24 | csgohack
25 | 10.0
26 | hack
27 |
28 |
29 |
30 | DynamicLibrary
31 | true
32 | v143
33 | MultiByte
34 |
35 |
36 | DynamicLibrary
37 | false
38 | v143
39 | true
40 | MultiByte
41 |
42 |
43 | DynamicLibrary
44 | true
45 | v143
46 | MultiByte
47 |
48 |
49 | DynamicLibrary
50 | false
51 | v143
52 | true
53 | MultiByte
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 | .dll
75 |
76 |
77 |
78 | Level4
79 | Disabled
80 | true
81 |
82 |
83 | _WINDLL;%(PreprocessorDefinitions); BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE
84 | %(AdditionalIncludeDirectories)
85 | stdcpp17
86 |
87 |
88 | %(AdditionalLibraryDirectories)
89 |
90 |
91 |
92 |
93 | Level3
94 | Disabled
95 | true
96 | E:\C++ Libraries\boost_1_67_0;%(AdditionalIncludeDirectories)
97 | stdcpp17
98 |
99 |
100 | D:\libraries\boost_1_79_0;%(AdditionalLibraryDirectories)
101 |
102 |
103 |
104 |
105 | Level3
106 | MaxSpeed
107 | true
108 | true
109 | true
110 | %(AdditionalIncludeDirectories)
111 | stdcpp17
112 |
113 |
114 | true
115 | true
116 | %(AdditionalLibraryDirectories)
117 |
118 |
119 |
120 |
121 | Level3
122 | MaxSpeed
123 | true
124 | true
125 | true
126 | E:\C++ Libraries\boost_1_67_0;%(AdditionalIncludeDirectories)
127 | stdcpp17
128 |
129 |
130 | true
131 | true
132 | D:\libraries\boost_1_79_0;%(AdditionalLibraryDirectories)
133 |
134 |
135 |
136 |
137 |
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 |
--------------------------------------------------------------------------------
/hack/hack.vcxproj.filters:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Source
6 |
7 |
8 | Source
9 |
10 |
11 | Source
12 |
13 |
14 | Source
15 |
16 |
17 | Source
18 |
19 |
20 | Source
21 |
22 |
23 | Source\Features
24 |
25 |
26 | Source\Features
27 |
28 |
29 | Source\Features
30 |
31 |
32 | Source\Features
33 |
34 |
35 | Source\Features
36 |
37 |
38 | Source
39 |
40 |
41 | Source\Utility
42 |
43 |
44 | Source\Utility
45 |
46 |
47 | Source
48 |
49 |
50 |
51 |
52 | Header
53 |
54 |
55 | Header
56 |
57 |
58 | Header
59 |
60 |
61 | Header
62 |
63 |
64 | Header
65 |
66 |
67 | Header
68 |
69 |
70 | Header
71 |
72 |
73 | Header
74 |
75 |
76 | Header
77 |
78 |
79 | Header
80 |
81 |
82 | Header\Features
83 |
84 |
85 | Header\Features
86 |
87 |
88 | Header\Features
89 |
90 |
91 | Header\Features
92 |
93 |
94 | Header\Features
95 |
96 |
97 | Header\Utility
98 |
99 |
100 | Header\Utility
101 |
102 |
103 | Header\Utility
104 |
105 |
106 | Header
107 |
108 |
109 |
110 |
111 | {a50e8b80-07ae-48d8-a926-227033578ed0}
112 |
113 |
114 | {6a574879-2786-44fb-b2c7-6499322b7b34}
115 |
116 |
117 | {0307ee89-911d-4679-8c9d-29421b83dd39}
118 |
119 |
120 | {cd18748b-6690-40b2-8713-00ed1d4b7db9}
121 |
122 |
123 | {aec33fce-5204-4970-aef0-30b07d4c40fd}
124 |
125 |
126 | {0a7e9bc3-e6fc-4d3e-ad29-f174ea555bf1}
127 |
128 |
129 |
--------------------------------------------------------------------------------
/hack/main.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 |
5 | #include "utility.h"
6 | #include "control.h"
7 | #include "equipment.h"
8 | #include "parser.h"
9 | #include "output.h"
10 |
11 | DWORD client_handle = 0;
12 | DWORD engine_handle = 0;
13 |
14 | Offset* ptr_offset = nullptr;
15 | Entity* ptr_local_entity = nullptr;
16 | Entity* ptr_entity_list = nullptr;
17 | Weapon* ptr_active_weapon = nullptr;
18 | Configuration* ptr_active_config = nullptr;
19 | Equipment equipment;
20 |
21 | void main()
22 | {
23 | AllocConsole();
24 | AttachConsole(GetCurrentProcessId());
25 | #pragma warning( disable : 4996)
26 | freopen("CONOUT$", "w", stdout);
27 |
28 | Output::PrintToConsole("Anda's CS Cheat, 09/2019 version", 1, DARK_CYAN, BLACK);
29 | if (!Parser::ReadConfig()) return;
30 |
31 | if (!equipment.weapons.at(0).GetActiveConfig()->activate_console)
32 | {
33 | HWND stealth = FindWindowA("ConsoleWindowClass", NULL);
34 | ShowWindow(stealth, 0);
35 | }
36 |
37 | Offset offset;
38 | ptr_offset = &offset;
39 | if (!Parser::LoadOffsets()) return;
40 |
41 | Output::PrintTime();
42 | Output::PrintToConsole("ACTIVE", 2, GREEN, BLACK);
43 |
44 | if (equipment.weapons.at(0).GetActiveConfig()->hide_console_after_startup)
45 | {
46 | std::this_thread::sleep_for(std::chrono::milliseconds(3000));
47 | HWND stealth = FindWindowA("ConsoleWindowClass", NULL);
48 | ShowWindow(stealth, 0);
49 | }
50 |
51 | while (client_handle == 0 || engine_handle == 0)
52 | {
53 | if ((DWORD)GetModuleHandle("client.dll") != 0) client_handle = (DWORD)GetModuleHandle("client.dll");
54 | if ((DWORD)GetModuleHandle("engine.dll") != 0) engine_handle = (DWORD)GetModuleHandle("engine.dll");
55 | }
56 |
57 | Entity list[1024];
58 | ptr_entity_list = list;
59 | Weapon active_weapon;
60 | ptr_active_weapon = &active_weapon;
61 | Control control;
62 | bool on_server = false;
63 | std::clock_t t_last_tick = std::clock();
64 |
65 | std::thread utility(&Control::SyncUtilityThread, control);
66 |
67 | for (;;)
68 | {
69 | if (Utility::ClockDiff(std::clock(), t_last_tick) < ptr_active_weapon->GetActiveConfig()->sync_break) continue;
70 |
71 | t_last_tick = std::clock();
72 |
73 | if (!Memory::GetOnServer())
74 | {
75 | if (on_server)
76 | {
77 | ptr_active_weapon = &active_weapon;
78 | control = Control();
79 | ptr_local_entity = nullptr;
80 | }
81 | on_server = false;
82 | continue;
83 | }
84 |
85 | on_server = true;
86 |
87 | int hostile_id = 0;
88 | for (int i = 0; i < Memory::GetMaxEntity(); i++) (ptr_entity_list + i)->Update(i, &hostile_id);
89 | if (ptr_local_entity == nullptr) continue;
90 |
91 | equipment.UpdateActiveWeapon();
92 | control.Sync();
93 | }
94 | }
95 |
96 | #pragma warning( disable : 4100)
97 | BOOL WINAPI DllMain(HINSTANCE hdll, DWORD dw_reason, LPVOID)
98 | {
99 | if (dw_reason == DLL_PROCESS_ATTACH)
100 | {
101 | CreateThread(0, 0, (LPTHREAD_START_ROUTINE)main, 0, 0, 0);
102 | }
103 | return TRUE;
104 | }
--------------------------------------------------------------------------------
/hack/memory.cpp:
--------------------------------------------------------------------------------
1 | #include "memory.h"
2 | #include "offsets.h"
3 |
4 | int Memory::GetMaxEntity()
5 | {
6 | int max_entity = *(int*)(client_handle + ptr_offset->dw_entity_list + 0x4);
7 | max_entity < 1024 ? max_entity : 1024;
8 | return max_entity;
9 | }
10 |
11 | bool Memory::GetValidEntity(int entity_id, DWORD* ptr_entity)
12 | {
13 | *ptr_entity = *(DWORD*)(client_handle + ptr_offset->dw_entity_list + (entity_id - 1) * ptr_offset->entity_span);
14 | return *ptr_entity != 0;
15 | }
16 |
17 | bool Memory::GetLocalEntity(DWORD address)
18 | {
19 | return address == *(DWORD*)(client_handle + ptr_offset->dw_local_player);
20 | }
21 |
22 | void Memory::GetEntityClassID(DWORD address, int* value)
23 | {
24 | *value = *(int*)(*(DWORD*)(*(DWORD*)(*(DWORD*)(address + 0x8) + 0x8) + 0x1) + 0x14);
25 | }
26 |
27 | bool Memory::GetOnServer()
28 | {
29 | return *(int*)(*(DWORD*)(engine_handle + ptr_offset->dw_client_state) + ptr_offset->dw_client_state_state) == 6;
30 | }
31 |
32 | void Memory::GetBoneMatrixVector(DWORD address, int boneId, Vector* vector)
33 | {
34 | DWORD bone_matrix_base = *(DWORD*)(address + ptr_offset->dw_bone_matrix);
35 | if (bone_matrix_base != 0)
36 | {
37 | vector->x = *(float*)(bone_matrix_base + 0x0C + 0x30 * boneId);
38 | vector->y = *(float*)(bone_matrix_base + 0x0C + 0x30 * boneId + 0x10);
39 | vector->z = *(float*)(bone_matrix_base + 0x0C + 0x30 * boneId + 0x20);
40 | }
41 | }
42 |
43 | void Memory::GetEntityFromHandle(DWORD handle, DWORD* ptr_entity)
44 | {
45 | *ptr_entity = *(DWORD*)(client_handle + ptr_offset->dw_entity_list + ((handle & 0xFFF) - 1) * 0x10);
46 | }
47 |
48 | void Memory::GetViewAngle(Axis* axis)
49 | {
50 | *axis = *(Axis*)(*(DWORD*)(engine_handle + ptr_offset->dw_client_state) + ptr_offset->dw_client_state_view_angles);
51 | }
52 |
53 | void Memory::GetInHLTV(bool* in_hltv)
54 | {
55 | *in_hltv = *reinterpret_cast(*reinterpret_cast(engine_handle + ptr_offset->dw_client_state) + ptr_offset->dw_client_state_is_hltv);
56 | }
57 |
58 | void Memory::SetAngle(Axis axis)
59 | {
60 | *(Axis*)(*(DWORD*)(engine_handle + ptr_offset->dw_client_state) + ptr_offset->dw_client_state_view_angles) = axis;
61 | }
62 |
63 | void Memory::SubtractFromViewAngle(Axis axis)
64 | {
65 | (*(Axis*)(*(DWORD*)(engine_handle + ptr_offset->dw_client_state) + ptr_offset->dw_client_state_view_angles)).SubtractDirect(axis);
66 | }
67 |
68 | void Memory::SetForceAttack(int i)
69 | {
70 | *(int*)(client_handle + ptr_offset->dw_force_attack) = i;
71 | }
72 |
73 | // write complete struct?
74 | void Memory::SetGlowData(DWORD glow_object, GlowData glow_data, bool render)
75 | {
76 | if (glow_object == 0) return;
77 | *(float*)(glow_object + 0x8) = glow_data.red;
78 | *(float*)(glow_object + 0xC) = glow_data.green;
79 | *(float*)(glow_object + 0x10) = glow_data.blue;
80 | *(float*)(glow_object + 0x14) = glow_data.alpha;
81 | if (glow_data.alpha < 0.01f) *(bool*)(glow_object + 0x28) = false;
82 | else *(bool*)(glow_object + 0x28) = render;
83 | }
84 |
85 | int Memory::GetForceAttack()
86 | {
87 | return *(int*)(client_handle + ptr_offset->dw_force_attack);
88 | }
89 |
90 | int Memory::GetGlowObjectManagerSize()
91 | {
92 | return *(int*)(client_handle + ptr_offset->dw_glow_object_manager + 0xC);
93 | }
94 |
95 | DWORD Memory::GetGlowObject(int index)
96 | {
97 | return *(DWORD*)(client_handle + ptr_offset->dw_glow_object_manager) + index * 0x38;
98 | }
--------------------------------------------------------------------------------
/hack/memory.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | #include "axis.h"
5 | #include "vector.h"
6 | #include "configuration.h"
7 |
8 | extern DWORD client_handle;
9 | extern DWORD engine_handle;
10 |
11 | namespace Memory
12 | {
13 | int GetMaxEntity();
14 | bool GetValidEntity(int entity_id, DWORD* ptr_entity);
15 | bool GetLocalEntity(DWORD address);
16 | void GetEntityClassID(DWORD address, int* value);
17 | bool GetOnServer();
18 |
19 | template
20 | void Get(DWORD address, const ptrdiff_t offset, T* value);
21 |
22 | void GetBoneMatrixVector(DWORD address, int bone_id, Vector* vector);
23 | void GetEntityFromHandle(DWORD handle, DWORD* ptr_entity);
24 | void GetViewAngle(Axis* axis);
25 | void GetInHLTV(bool* in_hltv);
26 |
27 |
28 | int GetForceAttack();
29 | int GetGlowObjectManagerSize();
30 |
31 | template
32 | void Set(DWORD address, const ptrdiff_t offset, T value);
33 |
34 | void SetAngle(Axis axis);
35 | void SubtractFromViewAngle(Axis axis);
36 | void SetForceAttack(int i);
37 | void SetGlowData(DWORD ptr_glow_object, GlowData glow_data, bool render);
38 |
39 | DWORD GetGlowObject(int index);
40 | };
41 |
42 | template
43 | inline void Memory::Get(DWORD address, const ptrdiff_t offset, T* value)
44 | {
45 | if (address != 0) *value = *(T*)(address + offset);
46 | }
47 |
48 | template
49 | inline void Memory::Set(DWORD address, const ptrdiff_t offset, T value)
50 | {
51 | if (address == 0) return;
52 | *(T*)(address + offset) = value;
53 | }
--------------------------------------------------------------------------------
/hack/offsets.cpp:
--------------------------------------------------------------------------------
1 | #include "Offsets.h"
2 |
3 |
4 |
5 | Offsets::Offsets()
6 | {
7 | }
8 |
9 |
10 | Offsets::~Offsets()
11 | {
12 | }
13 |
--------------------------------------------------------------------------------
/hack/offsets.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | // https://github.com/frk1/hazedumper
5 |
6 | struct Offset
7 | {
8 | ptrdiff_t entity_span = 0x10;
9 | ptrdiff_t dormant = 0xED;
10 | ptrdiff_t armor_value = 0;
11 | ptrdiff_t aim_punch_angle = 0;
12 | ptrdiff_t aim_punch_angle_vel = 0;
13 | ptrdiff_t gun_game_immunity = 0;
14 | ptrdiff_t in_reload = 0;
15 | ptrdiff_t is_scoped = 0;
16 | ptrdiff_t spotted_by_mask = 0;
17 | ptrdiff_t dw_bone_matrix = 0;
18 | ptrdiff_t flags = 0;
19 | ptrdiff_t active_weapon = 0;
20 | ptrdiff_t clip = 0;
21 | ptrdiff_t crosshair_id = 0;
22 | ptrdiff_t health = 0;
23 | ptrdiff_t item_definition_index = 0;
24 | ptrdiff_t shots_fired = 0;
25 | ptrdiff_t team_num = 0;
26 | ptrdiff_t life_state = 0;
27 | ptrdiff_t vec_origin = 0;
28 | ptrdiff_t vec_velocity = 0;
29 | ptrdiff_t vec_view_offset = 0;
30 | ptrdiff_t dw_client_state = 0;
31 | ptrdiff_t dw_client_state_is_hltv = 0;
32 | ptrdiff_t dw_client_state_state = 0;
33 | ptrdiff_t dw_client_state_view_angles = 0;
34 | ptrdiff_t dw_entity_list = 0;
35 | ptrdiff_t dw_force_attack = 0;
36 | ptrdiff_t dw_force_backward = 0;
37 | ptrdiff_t dw_force_forward = 0;
38 | ptrdiff_t dw_force_jump = 0;
39 | ptrdiff_t dw_force_left = 0;
40 | ptrdiff_t dw_force_right = 0;
41 | ptrdiff_t dw_glow_object_manager = 0;
42 | ptrdiff_t dw_local_player = 0;
43 | };
44 |
45 | extern Offset* ptr_offset;
--------------------------------------------------------------------------------
/hack/output.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 |
12 | #include "output.h"
13 |
14 | using std::cout;
15 | using std::cin;
16 | using std::endl;
17 |
18 | void Output::SetRandomConsoleTitle(int length)
19 | {
20 | SetConsoleTitle(GenerateRandomString(length).c_str());
21 | }
22 |
23 | void Output::ClearConsole()
24 | {
25 | COORD top_left = { 0, 0 };
26 | HANDLE console = GetStdHandle(STD_OUTPUT_HANDLE);
27 | CONSOLE_SCREEN_BUFFER_INFO screen;
28 | DWORD written;
29 |
30 | GetConsoleScreenBufferInfo(console, &screen);
31 | FillConsoleOutputCharacterA(console, ' ', screen.dwSize.X * screen.dwSize.Y, top_left, &written);
32 | FillConsoleOutputAttribute(console, FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_BLUE, screen.dwSize.X * screen.dwSize.Y, top_left, &written);
33 | SetConsoleCursorPosition(console, top_left);
34 | }
35 |
36 | void Output::PrintToConsole(string message, Color color_text, Color color_bg)
37 | {
38 | SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), (static_cast(color_text) + static_cast(16) * static_cast(color_bg)));
39 | std::cout << message;
40 | }
41 |
42 | void Output::PrintToConsole(short lb1, string message, Color color_text, Color color_background)
43 | {
44 | while (lb1 > 0)
45 | {
46 | cout << endl;
47 | lb1--;
48 | }
49 | PrintToConsole(message, color_text, color_background);
50 | }
51 |
52 | void Output::PrintToConsole(string message, short lb2, Color color_text, Color color_background)
53 | {
54 | PrintToConsole(message, color_text, color_background);
55 | while (lb2 > 0)
56 | {
57 | cout << endl;
58 | lb2--;
59 | }
60 | }
61 |
62 | void Output::PrintToConsole(short lb1, string message, short lb2, Color color_text, Color color_background)
63 | {
64 | while (lb1 > 0)
65 | {
66 | cout << endl;
67 | lb1--;
68 | }
69 | PrintToConsole(message, color_text, color_background);
70 | while (lb2 > 0)
71 | {
72 | cout << endl;
73 | lb2--;
74 | }
75 | }
76 |
77 | void Output::PrintErrorAndExit(string message, unsigned short time_to_exit)
78 | {
79 | ClearConsole();
80 | PrintToConsole(message, 1, RED, BLACK);
81 | Sleep(time_to_exit * 1000);
82 | exit(0);
83 | }
84 |
85 | #pragma warning( disable : 4505)
86 | void Output::PrintTime()
87 | {
88 | auto t = std::time(nullptr);
89 | #pragma warning(disable : 4996)
90 | auto tm = *std::localtime(&t);
91 | std::ostringstream oss;
92 | oss << std::put_time(&tm, "%H:%M:%S");
93 | auto time = oss.str();
94 | PrintToConsole("[" + time + "] ", WHITE, BLACK);
95 | }
96 |
97 | string Output::GenerateRandomString(int length)
98 | {
99 | static auto& chrs = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
100 | thread_local static std::mt19937 rg{ std::random_device{}() };
101 | thread_local static std::uniform_int_distribution pick(0, sizeof(chrs) - 2);
102 | std::string s;
103 | s.reserve(length);
104 | while (length--) s += chrs[pick(rg)];
105 | return s;
106 | }
--------------------------------------------------------------------------------
/hack/output.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | using std::string;
5 |
6 | enum Color
7 | {
8 | BLACK = 0,
9 | DARK_BLUE = 1,
10 | DARK_GREEN = 2,
11 | DARK_CYAN = 3,
12 | DARK_RED = 4,
13 | DARK_PINK = 5,
14 | DARK_YELLOW = 6,
15 | MEDIUM_GRAY = 7,
16 | GRAY = 8,
17 | BLUE = 9,
18 | GREEN = 10,
19 | CYAN = 11,
20 | RED = 12,
21 | PINK = 13,
22 | YELLOW = 14,
23 | WHITE = 15
24 | };
25 |
26 | namespace Output
27 | {
28 | void SetRandomConsoleTitle(int length);
29 | void ClearConsole();
30 | void PrintToConsole(string message, Color color_text, Color color_bg);
31 | void PrintToConsole(short lb1, string message, Color color_text, Color color_bg);
32 | void PrintToConsole(string message, short lb2, Color color_text, Color color_bg);
33 | void PrintToConsole(short lb1, string message, short lb2, Color color_text, Color color_bg);
34 | void PrintErrorAndExit(string message, unsigned short time_exit);
35 | void PrintTime();
36 | string GenerateRandomString(const int len);
37 | };
--------------------------------------------------------------------------------
/hack/parser.cpp:
--------------------------------------------------------------------------------
1 | #include
2 | #include
3 | #include
4 | #include
5 | #include
6 | #include
7 | #include
8 | #include
9 | #include
10 | #include
11 | #include
12 |
13 | #include "parser.h"
14 | #include "equipment.h"
15 | #include "offsets.h"
16 | #include "output.h"
17 |
18 | #include "./includes/json.hpp"
19 |
20 | #pragma warning(push, 0)
21 | #pragma warning(pop)
22 |
23 | namespace fs = std::filesystem;
24 | using json = nlohmann::json;
25 |
26 | bool Parser::GetConfigPath(string* path, string file_name)
27 | {
28 | CHAR my_documents[MAX_PATH];
29 | HRESULT result = SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, SHGFP_TYPE_CURRENT, my_documents);
30 | if (result != S_OK) return false;
31 |
32 | string path_documents(my_documents);
33 | path_documents.append("\\Anda");
34 | if (!fs::exists(path_documents))
35 | {
36 | fs::create_directory(path_documents);
37 | Output::PrintTime();
38 | Output::PrintToConsole("Configuration directory created ", WHITE, BLACK);
39 | Output::PrintToConsole("(" + path_documents + ")", 1, GRAY, BLACK);
40 | }
41 | *path = path_documents + "\\" + file_name;
42 | return true;
43 | }
44 |
45 | short Parser::ParseKey(string key)
46 | {
47 | if (key == "LMB") return 0x01;
48 | else if (key == "RMB") return 0x02;
49 | else if (key == "CANCEL") return 0x03;
50 | else if (key == "MMB") return 0x04;
51 | else if (key == "MB1") return 0x05;
52 | else if (key == "MB2") return 0x06;
53 | else if (key == "BACKSPACE") return 0x08;
54 | else if (key == "TAB") return 0x09;
55 | else if (key == "CLEAR") return 0x0C;
56 | else if (key == "ENTER") return 0x0D;
57 | else if (key == "SHIFT") return 0x10;
58 | else if (key == "CTRL") return 0x11;
59 | else if (key == "ALT") return 0x12;
60 | else if (key == "PAUSE") return 0x13;
61 | else if (key == "CAPS_LOCK") return 0x14;
62 | else if (key == "ESC") return 0x1B;
63 | else if (key == "SPACE") return 0x20;
64 | else if (key == "PAGE_UP") return 0x21;
65 | else if (key == "PAGE_DOWN") return 0x22;
66 | else if (key == "END") return 0x23;
67 | else if (key == "HOME") return 0x24;
68 | else if (key == "LEFT_ARROW") return 0x25;
69 | else if (key == "UP_ARROW") return 0x26;
70 | else if (key == "RIGHT_ARROW") return 0x27;
71 | else if (key == "DOWN_ARROW") return 0x28;
72 | else if (key == "PRINT") return 0x2A;
73 | else if (key == "INSERT") return 0x2D;
74 | else if (key == "DELETE") return 0x2E;
75 | else if (key == "HELP") return 0x2F;
76 | else if (key == "0") return 0x30;
77 | else if (key == "1") return 0x31;
78 | else if (key == "2") return 0x32;
79 | else if (key == "3") return 0x33;
80 | else if (key == "4") return 0x34;
81 | else if (key == "5") return 0x35;
82 | else if (key == "6") return 0x36;
83 | else if (key == "7") return 0x37;
84 | else if (key == "8") return 0x38;
85 | else if (key == "9") return 0x39;
86 | else if (key == "A") return 0x41;
87 | else if (key == "B") return 0x42;
88 | else if (key == "C") return 0x43;
89 | else if (key == "D") return 0x44;
90 | else if (key == "E") return 0x45;
91 | else if (key == "F") return 0x46;
92 | else if (key == "G") return 0x47;
93 | else if (key == "H") return 0x48;
94 | else if (key == "I") return 0x49;
95 | else if (key == "J") return 0x4A;
96 | else if (key == "K") return 0x4B;
97 | else if (key == "L") return 0x4C;
98 | else if (key == "M") return 0x4D;
99 | else if (key == "N") return 0x4E;
100 | else if (key == "O") return 0x4F;
101 | else if (key == "P") return 0x50;
102 | else if (key == "Q") return 0x51;
103 | else if (key == "R") return 0x52;
104 | else if (key == "S") return 0x53;
105 | else if (key == "T") return 0x54;
106 | else if (key == "U") return 0x55;
107 | else if (key == "V") return 0x56;
108 | else if (key == "W") return 0x57;
109 | else if (key == "X") return 0x58;
110 | else if (key == "Y") return 0x59;
111 | else if (key == "Z") return 0x5A;
112 | else if (key == "F1") return VK_F1;
113 | else if (key == "F2") return VK_F2;
114 | else if (key == "F3") return VK_F3;
115 | else if (key == "F4") return VK_F4;
116 | else if (key == "F5") return VK_F5;
117 | else if (key == "F6") return VK_F6;
118 | else if (key == "F7") return VK_F7;
119 | else if (key == "F8") return VK_F8;
120 | else if (key == "F9") return VK_F9;
121 | else if (key == "F10") return VK_F10;
122 | else if (key == "F11") return VK_F11;
123 | else if (key == "F12") return VK_F12;
124 | else if (key == "SCROLL_LOCK") return VK_SCROLL;
125 | else if (key == "MENU") return VK_LMENU;
126 | else if (key == ";") return VK_OEM_1;
127 | else if (key == "=") return VK_OEM_PLUS;
128 | else if (key == ",") return VK_OEM_COMMA;
129 | else if (key == "-") return VK_OEM_MINUS;
130 | else if (key == ".") return VK_OEM_PERIOD;
131 | else if (key == "/") return VK_OEM_2;
132 | else if (key == "`") return VK_OEM_3;
133 | else if (key == "[") return VK_OEM_4;
134 | else if (key == "\"") return VK_OEM_5;
135 | else if (key == "]") return VK_OEM_6;
136 | else if (key == "'") return VK_OEM_7;
137 | else if (key == "NUMPAD_1") return 0x61;
138 | else if (key == "NUMPAD_2") return 0x62;
139 | else if (key == "NUMPAD_3") return 0x63;
140 | else if (key == "NUMPAD_4") return 0x64;
141 | else if (key == "NUMPAD_5") return 0x65;
142 | else if (key == "NUMPAD_6") return 0x66;
143 | else if (key == "NUMPAD_7") return 0x67;
144 | else if (key == "NUMPAD_8") return 0x68;
145 | else if (key == "NUMPAD_9") return 0x69;
146 | else if (key == "MULTIPLY") return 0x6A;
147 | else if (key == "ADD") return 0x6B;
148 | else if (key == "SUBTRACT") return 0x6D;
149 | else if (key == "DECIMAL") return 0x6E;
150 | else if (key == "DIVIDE") return 0X6F;
151 | else if (key == "LEFT_SHIFT") return 0XA0;
152 | else if (key == "RIGHT_SHIFT") return 0xA1;
153 | else if (key == "LEFT_CTRL") return 0xA2;
154 | else if (key == "RIGHT_CTRL") return 0xA3;
155 | else if (key == "LEFT_WINDOWS") return 0xA4;
156 | else if (key == "RIGHT_WINDOWS") return 0xA5;
157 | else if (key == "CLEAR") return 0xFE;
158 | else return (short)std::stoul(key, nullptr, 16);
159 | }
160 |
161 | void Parser::SetValue(Configuration* config, string name, string value)
162 | {
163 | if (name == "LoadConfigKey") config->load_config_key = ParseKey(value);
164 | else if (name == "PanicKey") config->panic_key = ParseKey(value);
165 | else if (name == "SyncBreak") config->sync_break = stoi(value);
166 | else if (name == "ActivateConsole") config->activate_console = String2Bool(value);
167 | else if (name == "HideConsoleAfterStartup") config->hide_console_after_startup = String2Bool(value);
168 | else if (name == "Variant::HoldKey") config->variant_hold_key = String2Bool(value);
169 | else if (name == "Variant::PlaySound") config->variant_play_sound = String2Bool(value);
170 |
171 | else if (name == "AimAssist::On") config->aim_assist_on = String2Bool(value);
172 | else if (name == "AimAssist::Key") config->aim_assist_key = ParseKey(value);
173 | else if (name == "AimAssist::HoldKey") config->aim_assist_hold_key = String2Bool(value);
174 | else if (name == "AimAssist::PlaySound") config->aim_assist_play_sound = String2Bool(value);
175 | else if (name == "AimAssist::FieldOfViewType") config->aim_assist_field_of_view_type = stoi(value);
176 | else if (name == "AimAssist::FieldOfView") config->aim_assist_field_of_view = stof(value);
177 | else if (name == "AimAssist::TrackingSpeed") config->aim_assist_tracking_speed = stof(value);
178 | else if (name == "AimAssist::TrackingSpeedFire") config->aim_assist_tracking_speed_fire = stof(value);
179 | else if (name == "AimAssist::CurbZone") config->aim_assist_curb_zone = stof(value);
180 | else if (name == "AimAssist::Punch") config->aim_assist_punch = stof(value);
181 | else if (name == "AimAssist::DistanceReduction") config->aim_assist_distance_reduction = stof(value);
182 | else if (name == "AimAssist::MaximumVelocity") config->aim_assist_maximum_velocity = stof(value);
183 | else if (name == "AimAssist::LinearVelocityMapping") config->aim_assist_linear_velocity_mapping = String2Bool(value);
184 | else if (name == "AimAssist::StickToTarget") config->aim_assist_stick_to_target = String2Bool(value);
185 | else if (name == "AimAssist::VisibilityCheck") config->aim_assist_visibility_check = String2Bool(value);
186 | else if (name == "AimAssist::FriendlyFire") config->aim_assist_friendly_fire = String2Bool(value);
187 | else if (name == "AimAssist::ForceHeadshot") config->aim_assist_force_headshot = String2Bool(value);
188 | else if (name == "AimAssist::ForceBodyAfterShots") config->aim_assist_force_body_after_shots = stoi(value);
189 | else if (name == "AimAssist::JumpDelay") config->aim_assist_jump_delay = stoi(value);
190 | else if (name == "AimAssist::CrouchDelay") config->aim_assist_crouch_delay = stoi(value);
191 | else if (name == "AimAssist::MovementPrediction") config->aim_assist_movement_prediction = stoi(value);
192 | else if (name == "AimAssist::TransferPause") config->aim_assist_transfer_pause = stoi(value);
193 | else if (name == "AimAssist::FirePause") config->aim_assist_fire_pause = stoi(value);
194 | else if (name == "AimAssist::PauseRangeExtensionFactor") config->aim_assist_pause_range_extension = stof(value);
195 | else if (name == "AimAssist::SpotDelay") config->aim_assist_spot_delay = stoi(value);
196 | else if (name == "AimAssist::ActivationSoftening") config->aim_assist_activation_softening = stoi(value);
197 |
198 | else if (name == "Triggerbot::On") config->triggerbot_on = String2Bool(value);
199 | else if (name == "Triggerbot::Key") config->triggerbot_key = ParseKey(value);
200 | else if (name == "Triggerbot::HoldKey") config->triggerbot_hold_key = String2Bool(value);
201 | else if (name == "Triggerbot::PlaySound") config->triggerbot_play_sound = String2Bool(value);
202 | else if (name == "Triggerbot::KeySpraydown") config->triggerbot_key_spraydown = ParseKey(value);
203 | else if (name == "Triggerbot::Mode") config->triggerbot_mode = stoi(value);
204 | else if (name == "Triggerbot::PauseAfterShot") config->triggerbot_pause_after_shot = stoi(value);
205 | else if (name == "Triggerbot::PauseRangeExtensionFactor") config->triggerbot_pause_range_extension_factor = stof(value);
206 | else if (name == "Triggerbot::FakeShotDuration") config->triggerbot_fake_shot_duration = stoi(value);
207 | else if (name == "Triggerbot::FireExtension") config->triggerbot_fire_extension = stoi(value);
208 | else if (name == "Triggerbot::Delay") config->triggerbot_delay = stoi(value);
209 | else if (name == "Triggerbot::MaximumDistance") config->triggerbot_maximum_distance = stof(value);
210 | else if (name == "Triggerbot::MaximumVelocity") config->triggerbot_maximum_velocity = stof(value);
211 | else if (name == "Triggerbot::DisableWhileEnteringScope") config->triggerbot_disable_while_entering_scope = String2Bool(value);
212 | else if (name == "Triggerbot::EnableInScopeOnly") config->triggerbot_enable_in_scope_only = String2Bool(value);
213 | else if (name == "Triggerbot::HeadOnly") config->triggerbot_head_only = String2Bool(value);
214 | else if (name == "Triggerbot::FriendlyFire") config->triggerbot_friendly_fire = String2Bool(value);
215 | else if (name == "Triggerbot::VisibilityCheck") config->triggerbot_visibility_check = String2Bool(value);
216 |
217 | else if (name == "GlowESP::On") config->glow_esp_on = String2Bool(value);
218 | else if (name == "GlowESP::Key") config->glow_esp_key = ParseKey(value);
219 | else if (name == "GlowESP::HoldKey") config->glow_esp_hold_key = String2Bool(value);
220 | else if (name == "GlowESP::PlaySound") config->glow_esp_play_sound = String2Bool(value);
221 | else if (name == "GlowESP::ToggleForAllWeapons") config->glow_esp_toggle_for_all_weapons = String2Bool(value);
222 | else if (name == "GlowESP::SpottedOnly") config->glow_esp_spotted_only = String2Bool(value);
223 | else if (name == "GlowESP::DistinctColors") config->glow_esp_distinct_colors = String2Bool(value);
224 | else if (name == "GlowESP::DistinctMixFactor") config->glow_esp_distinct_mix_factor = stof(value);
225 | else if (name == "GlowESP::RGBA_Friendly") config->glow_esp_rgba_friendly = std::stoll(value, nullptr, 16);
226 | else if (name == "GlowESP::RGBA_Friendly1HP") config->glow_esp_rgba_friendly_1hp = std::stoll(value, nullptr, 16);
227 | else if (name == "GlowESP::RGBA_Hostile") config->glow_esp_rgba_hostile = std::stoll(value, nullptr, 16);
228 | else if (name == "GlowESP::RGBA_Hostile1HP") config->glow_esp_rgba_hostile_1hp = std::stoll(value, nullptr, 16);
229 | else if (name == "GlowESP::RGBA_Weapon") config->glow_esp_rgba_weapon = std::stoll(value, nullptr, 16);
230 | else if (name == "GlowESP::RGBA_Grenade") config->glow_esp_rgba_grenade = std::stoll(value, nullptr, 16);
231 | else if (name == "GlowESP::RGBA_Bomb") config->glow_esp_rgba_bomb = std::stoll(value, nullptr, 16);
232 | else if (name == "GlowESP::RGBA_Money") config->glow_esp_rgba_money = std::stoll(value, nullptr, 16);
233 | else if (name == "GlowESP::RGBA_DistinctColors") config->distinct_colors.push_back(GlowData(std::stoll(value, nullptr, 16)));
234 |
235 | else if (name == "Aimbot::On") config->aimbot_on = String2Bool(value);
236 | else if (name == "Aimbot::Key") config->aimbot_key = ParseKey(value);
237 | else if (name == "Aimbot::HoldKey") config->aimbot_hold_key = String2Bool(value);
238 | else if (name == "Aimbot::PlaySound") config->aimbot_play_sound = String2Bool(value);
239 | else if (name == "Aimbot::FieldOfView") config->aimbot_field_of_view = stof(value);
240 | else if (name == "Aimbot::SingleShot") config->aimbot_single_shot = String2Bool(value);
241 | else if (name == "Aimbot::FireShotIfNoTargetFound") config->aimbot_fire_if_no_target = String2Bool(value);
242 | else if (name == "Aimbot::VisibilityCheck") config->aimbot_visibility_check = String2Bool(value);
243 | else if (name == "Aimbot::FriendlyFire") config->aimbot_friendly_fire = String2Bool(value);
244 |
245 | else if (name == "RCS::On") config->rcs_on = String2Bool(value);
246 | else if (name == "RCS::Key") config->rcs_key = ParseKey(value);
247 | else if (name == "RCS::HoldKey") config->rcs_hold_key = String2Bool(value);
248 | else if (name == "RCS::PlaySound") config->rcs_play_sound = String2Bool(value);
249 | else if (name == "RCS::ReductionFactor") config->rcs_reduction_factor = stof(value);
250 | else if (name == "RCS::SyncPause") config->rcs_sync_pause = stoi(value);
251 |
252 | config->updateConfigurationObjects();
253 | }
254 |
255 | void Parser::Distribute(vector line, short run)
256 | {
257 | if (line.size() == 2 && run == RUN_TYPES) for (Weapon& w : equipment.weapons) SetValue(w.GetDefaultConfig(), line.at(0), line.at(1));
258 | else if (line.size() == 3 && run == RUN_WEAPONS)
259 | {
260 | std::string specification = line.at(0);
261 |
262 | WeaponType weapon_type = Weapon::String2WeaponType(specification);
263 | WeaponName weapon_name = Weapon::String2WeaponName(specification);
264 | if (weapon_type != WeaponType::INVALID_TYPE) { for (Weapon& w : equipment.weapons) if (w.weapon_type == weapon_type) SetValue(w.GetDefaultConfig(), line.at(1), line.at(2)); }
265 | else if (weapon_name != WeaponName::INVALID_NAME) { for (Weapon& w : equipment.weapons) if (w.weapon_name == weapon_name) SetValue(w.GetDefaultConfig(), line.at(1), line.at(2)); }
266 | }
267 | else if (line.size() == 5 && run == RUN_VARIANT)
268 | {
269 | std::string specification = line.at(0);
270 | if (line.at(1) != "VARIANT_KEY") return;
271 | short key = ParseKey(line.at(2));
272 |
273 | WeaponType weapon_type = Weapon::String2WeaponType(specification);
274 | WeaponName weapon_name = Weapon::String2WeaponName(specification);
275 | if (weapon_type != WeaponType::INVALID_TYPE) { for (Weapon& w : equipment.weapons) if (w.weapon_type == weapon_type) SetValue(w.GetConfigFromKey(key), line.at(3), line.at(4)); }
276 | else if (weapon_name != WeaponName::INVALID_NAME) { for (Weapon& w : equipment.weapons) if (w.weapon_name == weapon_name) SetValue(w.GetConfigFromKey(key), line.at(3), line.at(4)); }
277 | }
278 | else if (line.size() == 4 && run == RUN_VARIANT)
279 | {
280 | if (line.at(0) != "VARIANT_KEY") return;
281 | short key = ParseKey(line.at(1));
282 | for (Weapon& w : equipment.weapons) SetValue(w.GetConfigFromKey(key), line.at(2), line.at(3));
283 | }
284 | }
285 |
286 | bool Parser::String2Bool(const string& s)
287 | {
288 | return s.at(0) == '1';
289 | }
290 |
291 | bool Parser::ReadConfig()
292 | {
293 | string path;
294 | GetConfigPath(&path, "config.cfg");
295 |
296 | if (!fs::exists(path))
297 | {
298 | Output::PrintTime();
299 | Output::PrintToConsole(path, 0, GRAY, BLACK);
300 | Output::PrintToConsole(" is missing", 1, WHITE, BLACK);
301 | Output::PrintToConsole("\nprovide the file and restart", 1, DARK_RED, BLACK);
302 | std::this_thread::sleep_for(std::chrono::milliseconds(5000));
303 | return false;
304 | }
305 |
306 | std::ifstream infile(path);
307 |
308 | for (Weapon& w : equipment.weapons) w.ResetAllConfigs();
309 |
310 | std::string line;
311 | for (short run = 0; run <= 2; run++)
312 | {
313 | while (std::getline(infile, line))
314 | {
315 | if (line.size() == 0 || line.at(0) == '#') continue;
316 |
317 | std::vector words(0);
318 | words.push_back("");
319 |
320 | for (char& c : line)
321 | {
322 | if (c == ' ')
323 | {
324 | words.push_back("");
325 | continue;
326 | }
327 | words.back() += c;
328 | }
329 | Distribute(words, run);
330 | }
331 | infile.clear();
332 | infile.seekg(0, std::ios::beg);
333 | }
334 |
335 | infile.close();
336 |
337 | Output::PrintTime();
338 | Output::PrintToConsole("config.cfg ", GRAY, BLACK);
339 | Output::PrintToConsole("loaded", 1, WHITE, BLACK);
340 |
341 | return true;
342 | }
343 |
344 |
345 | bool Parser::LoadOffsets()
346 | {
347 | string path;
348 | GetConfigPath(&path, "offsets.json");
349 |
350 | if (!fs::exists(path))
351 | {
352 | Output::PrintTime();
353 | Output::PrintToConsole(path, GRAY, BLACK);
354 | Output::PrintToConsole(" is missing", 1, WHITE, BLACK);
355 | Output::PrintToConsole("\nprovide the file and restart", 1, DARK_RED, BLACK);
356 | std::this_thread::sleep_for(std::chrono::milliseconds(5000));
357 | return false;
358 | }
359 |
360 | json data;
361 |
362 | std::ifstream infile(path);
363 | if (infile.peek() == std::ifstream::traits_type::eof())
364 | {
365 | Output::PrintTime();
366 | Output::PrintToConsole(path, GRAY, BLACK);
367 | Output::PrintToConsole(" is empty", 1, WHITE, BLACK);
368 | Output::PrintToConsole("\nprovide the correct file and restart", 1, DARK_RED, BLACK);
369 | std::this_thread::sleep_for(std::chrono::milliseconds(5000));
370 | return false;
371 | }
372 |
373 | std::ifstream offsets_file(path, std::ifstream::binary);
374 | offsets_file >> data;
375 |
376 | ptr_offset->dw_client_state = strtol(data["signatures"]["dwClientState"].dump().c_str(), 0, 0);
377 | ptr_offset->dw_client_state_is_hltv = strtol(data["signatures"]["dwClientState_IsHLTV"].dump().c_str(), 0, 0);
378 | ptr_offset->dw_client_state_state = strtol(data["signatures"]["dwClientState_State"].dump().c_str(), 0, 0);
379 | ptr_offset->dw_client_state_view_angles = strtol(data["signatures"]["dwClientState_ViewAngles"].dump().c_str(), 0, 0);
380 | ptr_offset->dw_entity_list = strtol(data["signatures"]["dwEntityList"].dump().c_str(), 0, 0);
381 | ptr_offset->dw_force_attack = strtol(data["signatures"]["dwForceAttack"].dump().c_str(), 0, 0);
382 | ptr_offset->dw_force_backward = strtol(data["signatures"]["dwForceBackward"].dump().c_str(), 0, 0);
383 | ptr_offset->dw_force_forward = strtol(data["signatures"]["dwForceForward"].dump().c_str(), 0, 0);
384 | ptr_offset->dw_force_jump = strtol(data["signatures"]["dwForceJump"].dump().c_str(), 0, 0);
385 | ptr_offset->dw_force_left = strtol(data["signatures"]["dwForceLeft"].dump().c_str(), 0, 0);
386 | ptr_offset->dw_force_right = strtol(data["signatures"]["dwForceRight"].dump().c_str(), 0, 0);
387 | ptr_offset->dw_glow_object_manager = strtol(data["signatures"]["dwGlowObjectManager"].dump().c_str(), 0, 0);
388 | ptr_offset->dw_local_player = strtol(data["signatures"]["dwLocalPlayer"].dump().c_str(), 0, 0);
389 |
390 | ptr_offset->armor_value = strtol(data["netvars"]["m_ArmorValue"].dump().c_str(), 0, 0);
391 | ptr_offset->aim_punch_angle = strtol(data["netvars"]["m_aimPunchAngle"].dump().c_str(), 0, 0);
392 | ptr_offset->aim_punch_angle_vel = strtol(data["netvars"]["m_aimPunchAngleVel"].dump().c_str(), 0, 0);
393 | ptr_offset->gun_game_immunity = strtol(data["netvars"]["m_bGunGameImmunity"].dump().c_str(), 0, 0);
394 | ptr_offset->in_reload = strtol(data["netvars"]["m_bInReload"].dump().c_str(), 0, 0);
395 | ptr_offset->is_scoped = strtol(data["netvars"]["m_bIsScoped"].dump().c_str(), 0, 0);
396 | ptr_offset->spotted_by_mask = strtol(data["netvars"]["m_bSpottedByMask"].dump().c_str(), 0, 0);
397 | ptr_offset->dw_bone_matrix = strtol(data["netvars"]["m_dwBoneMatrix"].dump().c_str(), 0, 0);
398 | ptr_offset->flags = strtol(data["netvars"]["m_fFlags"].dump().c_str(), 0, 0);
399 | ptr_offset->active_weapon = strtol(data["netvars"]["m_hActiveWeapon"].dump().c_str(), 0, 0);
400 | ptr_offset->clip = strtol(data["netvars"]["m_iClip1"].dump().c_str(), 0, 0);
401 | ptr_offset->crosshair_id = strtol(data["netvars"]["m_iCrosshairId"].dump().c_str(), 0, 0);
402 | ptr_offset->health = strtol(data["netvars"]["m_iHealth"].dump().c_str(), 0, 0);
403 | ptr_offset->item_definition_index = strtol(data["netvars"]["m_iItemDefinitionIndex"].dump().c_str(), 0, 0);
404 | ptr_offset->shots_fired = strtol(data["netvars"]["m_iShotsFired"].dump().c_str(), 0, 0);
405 | ptr_offset->team_num = strtol(data["netvars"]["m_iTeamNum"].dump().c_str(), 0, 0);
406 | ptr_offset->life_state = strtol(data["netvars"]["m_lifeState"].dump().c_str(), 0, 0);
407 | ptr_offset->vec_origin = strtol(data["netvars"]["m_vecOrigin"].dump().c_str(), 0, 0);
408 | ptr_offset->vec_velocity = strtol(data["netvars"]["m_vecVelocity"].dump().c_str(), 0, 0);
409 | ptr_offset->vec_view_offset = strtol(data["netvars"]["m_vecViewOffset"].dump().c_str(), 0, 0);
410 |
411 |
412 | time_t raw_time = std::stoi(data["timestamp"].dump());
413 | struct tm* timeinfo;
414 | char buffer[80];
415 | #pragma warning(disable : 4996)
416 | timeinfo = localtime(&raw_time);
417 | strftime(buffer, sizeof(buffer), "%d.%m.%Y %H:%M:%S", timeinfo);
418 | std::string dumped(buffer);
419 |
420 | Output::PrintTime();
421 | Output::PrintToConsole("offsets.json ", GRAY, BLACK);
422 | Output::PrintToConsole("loaded ", WHITE, BLACK);
423 | Output::PrintToConsole("/ timestamp " + dumped, 1, WHITE, BLACK);
424 |
425 | return true;
426 | }
--------------------------------------------------------------------------------
/hack/parser.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 |
5 | #include "configuration.h"
6 |
7 | constexpr short RUN_TYPES = 0;
8 | constexpr short RUN_WEAPONS = 1;
9 | constexpr short RUN_VARIANT = 2;
10 |
11 | using std::string;
12 | using std::vector;
13 |
14 | namespace Parser
15 | {
16 | bool ReadConfig();
17 | bool LoadOffsets();
18 | bool GetConfigPath(string* path, string file_name);
19 | short ParseKey(string key);
20 | void SetValue(Configuration* config, string name, string value);
21 | void Distribute(vector line, short run);
22 | bool String2Bool(const string& s);
23 | };
--------------------------------------------------------------------------------
/hack/recoil_control.cpp:
--------------------------------------------------------------------------------
1 | #include "recoil_control.h"
2 | #include "axis.h"
3 | #include "weapon.h"
4 | #include "utility.h"
5 |
6 | RecoilControl::RecoilControl()
7 | {
8 | punch_backup = Axis();
9 | tracking_value_yaw = 1.f;
10 | tracking_value_pitch = 1.f;
11 | t_last_compensation = 0;
12 | t_random_pitch = std::clock();
13 | t_random_yaw = std::clock();
14 | }
15 |
16 | void RecoilControl::Activate()
17 | {
18 | if (ptr_active_weapon->weapon_type == WeaponType::SNIPER_RIFLE || ptr_active_weapon->weapon_type == WeaponType::SHOTGUN) return;
19 | if (ptr_local_entity->ammunition == 0) return;
20 | if (ptr_local_entity->shots_fired == 0) return;
21 | if (Utility::ClockDiff(std::clock(), t_last_compensation) < ptr_active_weapon->GetActiveConfig()->rcs_sync_pause) return;
22 | t_last_compensation = std::clock();
23 |
24 | Axis diff = ptr_local_entity->local_punch.SubtractNorm(punch_backup);
25 | punch_backup = ptr_local_entity->local_punch;
26 | diff.MultiplyDirect(2.f * ptr_active_weapon->GetActiveConfig()->rcs_reduction_factor);
27 |
28 | if (ptr_local_entity->shots_fired == 0) return;
29 |
30 | if (Utility::ClockDiff(std::clock(), t_random_yaw) > 315)
31 | {
32 | tracking_value_yaw = 0.7f + 0.6f * static_cast(std::rand()) / static_cast(RAND_MAX);
33 | t_random_yaw = std::clock();
34 | }
35 | if (Utility::ClockDiff(std::clock(), t_random_pitch) > 415)
36 | {
37 | tracking_value_pitch = 0.8f + 0.4f * (float)std::rand() / (float)RAND_MAX;
38 | t_random_pitch = std::clock();
39 | }
40 | diff.yaw *= tracking_value_yaw;
41 | diff.pitch *= tracking_value_pitch;
42 |
43 | Memory::SubtractFromViewAngle(diff);
44 | }
45 |
46 | void RecoilControl::Reset()
47 | {
48 | punch_backup = ptr_local_entity->local_punch;
49 | }
--------------------------------------------------------------------------------
/hack/recoil_control.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | #include "entity.h"
5 | #include "configuration.h"
6 | #include "axis.h"
7 |
8 | class RecoilControl
9 | {
10 | public:
11 | RecoilControl();
12 | void Activate();
13 | void Reset();
14 | private:
15 | Axis punch_backup;
16 | float tracking_value_yaw, tracking_value_pitch;
17 | std::clock_t t_last_compensation;
18 | std::clock_t t_random_pitch, t_random_yaw;
19 | };
--------------------------------------------------------------------------------
/hack/triggerbot.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include "triggerbot.h"
4 | #include "memory.h"
5 | #include "entity.h"
6 | #include "weapon.h"
7 | #include "utility.h"
8 |
9 | Triggerbot::Triggerbot()
10 | {
11 | t_target_killed = 0;
12 | target_id = -1;
13 | real_target_id = -1;
14 | target_alive_last_tick = false;
15 | t_on_target = std::clock();
16 | t_shot_scheduled = std::clock();
17 | shot_scheduled = false;
18 | distance = 0.f;
19 | }
20 |
21 | void Triggerbot::Activate(bool spraydown)
22 | {
23 | int pause = ptr_active_weapon->GetActiveConfig()->triggerbot_pause_after_shot;
24 | if (target_id != -1)
25 | {
26 | if (target_alive_last_tick && ((ptr_entity_list + target_id)->life_state == LIFE_STATE_DYING || (ptr_entity_list + target_id)->life_state == LIFE_STATE_DEAD))
27 | {
28 | t_target_killed = std::clock();
29 | target_alive_last_tick = false;
30 | }
31 |
32 | float target_distance = ((ptr_entity_list + target_id)->origin - ptr_local_entity->origin).Abs();
33 | pause += static_cast(ptr_active_weapon->GetActiveConfig()->triggerbot_pause_range_extension_factor * target_distance);
34 | }
35 |
36 | if (ptr_active_weapon->GetActiveConfig()->triggerbot_enable_in_scope_only && !ptr_local_entity->in_scope) return;
37 | if (Utility::ClockDiff(std::clock(), ptr_local_entity->t_last_weapon_change) < ptr_active_weapon->time) return;
38 |
39 | if (!spraydown && Utility::ClockDiff(std::clock(), ptr_local_entity->t_shot_fired) < pause) return;
40 | if (ptr_local_entity->velocity > ptr_active_weapon->GetActiveConfig()->triggerbot_maximum_velocity) return;
41 |
42 | if (Utility::ClockDiff(std::clock(), t_target_killed) < static_cast(static_cast(ptr_active_weapon->GetActiveConfig()->triggerbot_fake_shot_duration)) &&
43 | target_id == real_target_id &&
44 | Utility::ClockDiff(std::clock(), t_on_target) < 1000)
45 | {
46 | Fire();
47 | return;
48 | }
49 |
50 | Search();
51 | distance = ((ptr_entity_list + target_id)->origin - ptr_local_entity->origin).Abs();
52 | if (distance > ptr_active_weapon->GetActiveConfig()->triggerbot_maximum_distance) return;
53 | if (target_id != -1 && (ptr_entity_list + target_id)->life_state == LIFE_STATE_ALIVE) target_alive_last_tick = true;
54 |
55 | if (ptr_active_weapon->GetActiveConfig()->triggerbot_disable_while_entering_scope && ptr_local_entity->in_scope && Utility::ClockDiff(std::clock(), ptr_local_entity->t_not_in_scope) < 1000)
56 | {
57 | float distance_factor = distance / 4000.f;
58 | if (distance_factor > 1.f) distance_factor = 1.f;
59 | if (Utility::ClockDiff(std::clock(), ptr_local_entity->t_not_in_scope) < static_cast(100.f + distance_factor * 700.f)) return;
60 | }
61 |
62 | if (ptr_active_weapon->GetActiveConfig()->triggerbot_head_only)
63 | {
64 | float comp_val = Vector::AxisFromVector(ptr_local_entity->origin_view - (ptr_entity_list + target_id)->origin_head).DistanceAbs(ptr_local_entity->local_view).pitch;
65 | float head_radius = std::atan(4.f / distance) * 180.f / PI;
66 | if (comp_val > head_radius) return;
67 | }
68 |
69 | if (OnTarget())
70 | {
71 | t_on_target = std::clock();
72 | ScheduleShot();
73 | }
74 |
75 | if (spraydown && Utility::ClockDiff(std::clock(), t_on_target) < ptr_active_weapon->GetActiveConfig()->triggerbot_fire_extension) ScheduleShot();
76 |
77 | if (shot_scheduled && Utility::ClockDiff(std::clock(), t_shot_scheduled) >= ptr_active_weapon->GetActiveConfig()->triggerbot_delay) Fire();
78 | }
79 |
80 | void Triggerbot::Search()
81 | {
82 | float diff = 99999.f;
83 | int tmp_target_id = -1;
84 |
85 | for (int i = 0; i <= 64; i++)
86 | {
87 | if ((ptr_entity_list + i) == 0) continue;
88 |
89 | if ((ptr_active_weapon->GetActiveConfig()->triggerbot_friendly_fire || (ptr_entity_list + i)->team != ptr_local_entity->team) && (ptr_entity_list + i)->dormant == 0 && (ptr_entity_list + i)->life_state == LIFE_STATE_ALIVE && !(ptr_entity_list + i)->immune)
90 | {
91 | float comp_val;
92 | comp_val = Vector::AxisFromVector(ptr_local_entity->origin_view - (ptr_entity_list + i)->origin_head).DistanceAbs(ptr_local_entity->local_view).Abs();
93 | if (comp_val < diff)
94 | {
95 | tmp_target_id = i;
96 | diff = comp_val;
97 | }
98 | }
99 | }
100 | target_id = tmp_target_id;
101 | }
102 |
103 | void Triggerbot::ScheduleShot()
104 | {
105 | if (ptr_active_weapon->GetActiveConfig()->triggerbot_delay == 0) Fire();
106 | else if (!shot_scheduled)
107 | {
108 | shot_scheduled = true;
109 | t_shot_scheduled = std::clock();
110 | }
111 | }
112 |
113 | // dangerous click spam
114 | void Triggerbot::Fire()
115 | {
116 | INPUT input = { 0 };
117 | input.type = INPUT_MOUSE;
118 | input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
119 | SendInput(1, &input, sizeof(INPUT));
120 | input.mi.dwFlags = MOUSEEVENTF_LEFTUP;
121 | SendInput(1, &input, sizeof(INPUT));
122 | ptr_local_entity->t_shot_fired = std::clock();
123 | shot_scheduled = false;
124 | }
125 |
126 | bool Triggerbot::OnTarget()
127 | {
128 | switch (ptr_active_weapon->GetActiveConfig()->triggerbot_mode)
129 | {
130 | case 0:
131 | return OnTargetIncross();
132 | case 1:
133 | return OnTargetHitbox();
134 | case 2:
135 | return OnTargetIncross() || OnTargetHitbox();
136 | default:
137 | return false;
138 | }
139 | }
140 |
141 | bool Triggerbot::OnTargetIncross()
142 | {
143 | if (ptr_local_entity->crosshair_id == 0) return false;
144 | if (!(ptr_entity_list + ptr_local_entity->crosshair_id)->player) return false;
145 | if (!ptr_active_weapon->GetActiveConfig()->triggerbot_friendly_fire && ptr_local_entity->team == (ptr_entity_list + ptr_local_entity->crosshair_id)->team) return false;
146 | real_target_id = ptr_local_entity->crosshair_id;
147 | return true;
148 | }
149 |
150 | bool Triggerbot::OnTargetHitbox()
151 | {
152 | if (ptr_active_weapon->GetActiveConfig()->triggerbot_visibility_check && !(ptr_entity_list + target_id)->spotted_by_local_entity) return false;
153 | if (Vector::AxisFromVector(ptr_local_entity->origin_view - (ptr_entity_list + target_id)->origin_head).DistanceAbs(ptr_local_entity->local_view).Abs() < std::atan(5.f / distance) * 180.f / PI ||
154 | Vector::AxisFromVector(ptr_local_entity->origin_view - (ptr_entity_list + target_id)->origin_chest).DistanceAbs(ptr_local_entity->local_view).Abs() < std::atan(8.f / distance) * 180.f / PI ||
155 | Vector::AxisFromVector(ptr_local_entity->origin_view - (ptr_entity_list + target_id)->origin_stomach).DistanceAbs(ptr_local_entity->local_view).Abs() < std::atan(8.f / distance) * 180.f / PI)
156 | {
157 | real_target_id = ptr_local_entity->crosshair_id;
158 | return true;
159 | }
160 | else return false;
161 | }
--------------------------------------------------------------------------------
/hack/triggerbot.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | class Triggerbot
5 | {
6 | public:
7 | Triggerbot();
8 | void Activate(bool spraydown);
9 | private:
10 | clock_t t_target_killed;
11 | bool target_alive_last_tick;
12 | int target_id;
13 | int real_target_id;
14 | clock_t t_on_target;
15 | clock_t t_shot_scheduled;
16 | bool shot_scheduled;
17 |
18 | float distance;
19 | void Search();
20 | void ScheduleShot();
21 | void Fire();
22 | bool OnTarget();
23 | bool OnTargetIncross();
24 | bool OnTargetHitbox();
25 | };
--------------------------------------------------------------------------------
/hack/utility.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 |
4 | namespace Utility
5 | {
6 | #pragma warning( disable : 4505)
7 | static int ClockDiff(std::clock_t t1, std::clock_t t2)
8 | {
9 | float diffms;
10 | if (t1 > t2) diffms = float(t1 - t2) / (CLOCKS_PER_SEC / 1000);
11 | else diffms = float(t2 - t1) / (CLOCKS_PER_SEC / 1000);
12 | return static_cast(diffms);
13 | }
14 | }
--------------------------------------------------------------------------------
/hack/vector.cpp:
--------------------------------------------------------------------------------
1 | #include
2 |
3 | #include "vector.h"
4 |
5 | Vector::Vector()
6 | {
7 | x = 0;
8 | y = 0;
9 | z = 0;
10 | }
11 |
12 | Vector::Vector(float x, float y, float z)
13 | {
14 | this->x = x;
15 | this->y = y;
16 | this->z = z;
17 | }
18 |
19 | float Vector::Abs()
20 | {
21 | return (float)sqrt(x * x + y * y + z * z);
22 | }
23 |
24 | Vector Vector::operator-()
25 | {
26 | return Vector(-x, -y, -z);
27 | }
28 |
29 | Vector& Vector::operator+=(const Vector& v)
30 | {
31 | x += v.x;
32 | y += v.y;
33 | z += v.z;
34 | return *this;
35 | }
36 |
37 | bool Vector::AngleDEG(float* angle, Vector a, Vector b)
38 | {
39 | float a_abs_b_abs = a.Abs() * b.Abs();
40 | if (a_abs_b_abs == 0.f) return false;
41 | else
42 | {
43 | *angle = std::abs(180.f / PI * std::acos((a.x * b.x + a.y * b.y + a.z * b.z) / a_abs_b_abs));
44 | if (*angle > 90.f) *angle = 180 - *angle;
45 | return true;
46 | }
47 | }
48 |
49 | Vector Vector::UnitVector()
50 | {
51 | float abs = this->Abs();
52 | if (abs == 0.f) return Vector();
53 | return Vector(x / abs, y / abs, z / abs);
54 | }
55 |
56 | Axis Vector::AxisFromVector(Vector vector)
57 | {
58 | Axis axis;
59 | axis.pitch = (float)std::atan(vector.z / (float)sqrt(vector.x * vector.x + vector.y * vector.y)) * 180.f / PI;
60 | axis.yaw = (float)std::atan(vector.y / vector.x) / PI * 180.f;
61 | if (axis.yaw > 90.f) axis.yaw = 90.f;
62 | if (axis.yaw < -90.f) axis.yaw = -90.f;
63 | if (axis.pitch > 89.f) axis.pitch = 89.f;
64 | if (axis.pitch < -89.f) axis.pitch = -89.f;
65 | if (vector.x > 0 && vector.y > 0) axis.yaw -= 180.f;
66 | else if (vector.x > 0) axis.yaw += 180.f;
67 | return axis;
68 | }
--------------------------------------------------------------------------------
/hack/vector.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include "Axis.h"
3 |
4 | const float PI = 3.141592654f;
5 |
6 | struct Vector
7 | {
8 | Vector();
9 | Vector(float x, float y, float z);
10 |
11 | float Abs();
12 |
13 | inline Vector operator-(const Vector& v) { return Vector(x - v.x, y - v.y, z - v.z); }
14 | inline Vector operator+(const Vector& v) { return Vector(x + v.x, y + v.y, z + v.z); }
15 | inline Vector operator*(const float f) { return Vector(x * f, y * f, z * f); }
16 | inline Vector operator-();
17 | inline Vector& operator+=(const Vector& v);
18 |
19 | static bool AngleDEG(float* angle, Vector a, Vector b);
20 | Vector UnitVector();
21 | static Axis AxisFromVector(Vector vector);
22 |
23 | float x;
24 | float y;
25 | float z;
26 | };
--------------------------------------------------------------------------------
/hack/weapon.cpp:
--------------------------------------------------------------------------------
1 | #include "weapon.h"
2 |
3 | Weapon::Weapon()
4 | {
5 | weapon_name = INVALID_NAME;
6 | weapon_type = INVALID_TYPE;
7 | item_index = 0;
8 | configs.push_back(Configuration());
9 | time = 0;
10 | };
11 |
12 | Weapon::Weapon(WeaponName name, WeaponType type, short index, int t_switch)
13 | {
14 | weapon_name = name;
15 | weapon_type = type;
16 | item_index = index;
17 | time = t_switch;
18 | configs.push_back(Configuration());
19 | };
20 |
21 | WeaponName Weapon::String2WeaponName(string name)
22 | {
23 | if (name == "DEAGLE") return WeaponName::DEAGLE;
24 | else if (name == "BERETTAS") return WeaponName::BERETTAS;
25 | else if (name == "FIVESEVEN") return WeaponName::FIVESEVEN;
26 | else if (name == "GLOCK18") return WeaponName::GLOCK18;
27 | else if (name == "AK47") return WeaponName::AK47;
28 | else if (name == "AUG") return WeaponName::AUG;
29 | else if (name == "AWP") return WeaponName::AWP;
30 | else if (name == "FAMAS") return WeaponName::FAMAS;
31 | else if (name == "G3SG1") return WeaponName::G3SG1;
32 | else if (name == "GALILAR") return WeaponName::GALILAR;
33 | else if (name == "M249") return WeaponName::M249;
34 | else if (name == "M4A4") return WeaponName::M4A4;
35 | else if (name == "MAC10") return WeaponName::MAC10;
36 | else if (name == "P90") return WeaponName::P90;
37 | else if (name == "MP5SD") return WeaponName::MP5SD;
38 | else if (name == "UMP45") return WeaponName::UMP45;
39 | else if (name == "XM1014") return WeaponName::XM1014;
40 | else if (name == "BIZON") return WeaponName::BIZON;
41 | else if (name == "MAG7") return WeaponName::MAG7;
42 | else if (name == "NEGEV") return WeaponName::NEGEV;
43 | else if (name == "SAWEDOFF") return WeaponName::SAWEDOFF;
44 | else if (name == "TEC9") return WeaponName::TEC9;
45 | else if (name == "TASER") return WeaponName::TASER;
46 | else if (name == "P2000") return WeaponName::P2000;
47 | else if (name == "MP7") return WeaponName::MP7;
48 | else if (name == "MP9") return WeaponName::MP9;
49 | else if (name == "NOVA") return WeaponName::NOVA;
50 | else if (name == "P250") return WeaponName::P250;
51 | else if (name == "SCAR20") return WeaponName::SCAR20;
52 | else if (name == "SG553") return WeaponName::SG553;
53 | else if (name == "SSG08") return WeaponName::SSG08;
54 | else if (name == "KNIFE_CT") return WeaponName::KNIFE_CT;
55 | else if (name == "FLASHBANG") return WeaponName::FLASHBANG;
56 | else if (name == "HEGRENADE") return WeaponName::HEGRENADE;
57 | else if (name == "SMOKEGRENADE") return WeaponName::SMOKEGRENADE;
58 | else if (name == "MOLOTOV") return WeaponName::MOLOTOV;
59 | else if (name == "DECOY") return WeaponName::DECOY;
60 | else if (name == "INCGRENADE") return WeaponName::INCGRENADE;
61 | else if (name == "C4") return WeaponName::C4;
62 | else if (name == "KNIFE_T") return WeaponName::KNIFE_T;
63 | else if (name == "M4A1S") return WeaponName::M4A1S;
64 | else if (name == "USPS") return WeaponName::USPS;
65 | else if (name == "CZ75A") return WeaponName::CZ75A;
66 | else if (name == "REVOLVER") return WeaponName::REVOLVER;
67 | else if (name == "KNIFE_BAYONET") return WeaponName::KNIFE_BAYONET;
68 | else if (name == "KNIFE_FLIP") return WeaponName::KNIFE_FLIP;
69 | else if (name == "KNIFE_GUT") return WeaponName::KNIFE_GUT;
70 | else if (name == "KNIFE_KARAMBIT") return WeaponName::KNIFE_KARAMBIT;
71 | else if (name == "KNIFE_M9_BAYONET") return WeaponName::KNIFE_M9_BAYONET;
72 | else if (name == "KNIFE_TACTICAL") return WeaponName::KNIFE_TACTICAL;
73 | else if (name == "KNIFE_FALCHION") return WeaponName::KNIFE_FALCHION;
74 | else if (name == "KNIFE_SURVIVAL_BOWIE") return WeaponName::KNIFE_SURVIVAL_BOWIE;
75 | else if (name == "KNIFE_BUTTERFLY") return WeaponName::KNIFE_BUTTERFLY;
76 | else if (name == "KNIFE_PUSH") return WeaponName::KNIFE_PUSH;
77 | else return WeaponName::INVALID_NAME;
78 | }
79 |
80 | WeaponType Weapon::String2WeaponType(string type)
81 | {
82 | if (type == "KNIFE") return WeaponType::KNIFE;
83 | else if (type == "PISTOL") return WeaponType::PISTOL;
84 | else if (type == "SHOTGUN") return WeaponType::SHOTGUN;
85 | else if (type == "MACHINE_GUN") return WeaponType::MACHINE_GUN;
86 | else if (type == "SUBMACHINE_GUN") return WeaponType::SUBMACHINE_GUN;
87 | else if (type == "ASSAULT_RIFLE") return WeaponType::ASSAULT_RIFLE;
88 | else if (type == "SNIPER_RIFLE") return WeaponType::SNIPER_RIFLE;
89 | else if (type == "GRENADE") return WeaponType::GRENADE;
90 | else if (type == "BOMB") return WeaponType::BOMB;
91 | else return WeaponType::INVALID_TYPE;
92 | }
93 |
94 | Configuration* Weapon::GetActiveConfig()
95 | {
96 | for (Configuration& c : configs) if (c.button_variant.is_active()) return &c;
97 | return &configs.at(0);
98 | }
99 |
100 | Configuration* Weapon::GetDefaultConfig()
101 | {
102 | return &configs.at(0);
103 | }
104 |
105 | Configuration* Weapon::GetConfigFromKey(short key)
106 | {
107 | for (Configuration& c : configs) if (c.button_variant.key_code == key) return &c;
108 | configs.push_back(configs.at(0));
109 | configs.back().variant_key = key;
110 | return &configs.back();
111 | }
112 |
113 | void Weapon::ResetAllConfigs()
114 | {
115 | for (unsigned int i = 1; i < configs.size(); i++) configs.pop_back();
116 | }
--------------------------------------------------------------------------------
/hack/weapon.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 | #include
3 | #include
4 |
5 | #include "configuration.h"
6 |
7 | using std::string;
8 | using std::vector;
9 |
10 | enum WeaponType
11 | {
12 | INVALID_TYPE,
13 | KNIFE,
14 | PISTOL,
15 | SHOTGUN,
16 | MACHINE_GUN,
17 | SUBMACHINE_GUN,
18 | ASSAULT_RIFLE,
19 | SNIPER_RIFLE,
20 | GRENADE,
21 | BOMB,
22 | UTILITY
23 | };
24 |
25 | enum WeaponName
26 | {
27 | INVALID_NAME,
28 | DEAGLE,
29 | BERETTAS,
30 | FIVESEVEN,
31 | GLOCK18,
32 | AK47,
33 | AUG,
34 | AWP,
35 | FAMAS,
36 | G3SG1,
37 | GALILAR,
38 | M249,
39 | M4A4,
40 | MAC10,
41 | P90,
42 | MP5SD,
43 | UMP45,
44 | XM1014,
45 | BIZON,
46 | MAG7,
47 | NEGEV,
48 | SAWEDOFF,
49 | TEC9,
50 | TASER,
51 | P2000,
52 | MP7,
53 | MP9,
54 | NOVA,
55 | P250,
56 | SCAR20,
57 | SG553,
58 | SSG08,
59 | KNIFE_CT,
60 | FLASHBANG,
61 | HEGRENADE,
62 | SMOKEGRENADE,
63 | MOLOTOV,
64 | DECOY,
65 | INCGRENADE,
66 | C4,
67 | KNIFE_T,
68 | M4A1S,
69 | USPS,
70 | CZ75A,
71 | REVOLVER,
72 | KNIFE_BAYONET,
73 | KNIFE_FLIP,
74 | KNIFE_GUT,
75 | KNIFE_KARAMBIT,
76 | KNIFE_M9_BAYONET,
77 | KNIFE_TACTICAL,
78 | KNIFE_FALCHION,
79 | KNIFE_SURVIVAL_BOWIE,
80 | KNIFE_BUTTERFLY,
81 | KNIFE_PUSH,
82 | HEALTHSHOT
83 | };
84 |
85 | struct Weapon
86 | {
87 | Weapon();
88 | Weapon(WeaponName name, WeaponType type, short index, int switch_time);
89 | static WeaponName String2WeaponName(string name);
90 | static WeaponType String2WeaponType(string type);
91 | Configuration* GetActiveConfig();
92 | Configuration* GetDefaultConfig();
93 | Configuration* GetConfigFromKey(short key);
94 | void ResetAllConfigs();
95 |
96 | WeaponName weapon_name;
97 | WeaponType weapon_type;
98 | short item_index;
99 | int time;
100 | vector configs;
101 | };
102 |
103 | extern Weapon* ptr_active_weapon;
--------------------------------------------------------------------------------