-
Notifications
You must be signed in to change notification settings - Fork 1
/
sdk.h
308 lines (236 loc) · 6.57 KB
/
sdk.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
#pragma once
#include "stdafx.h"
#include "vec.h"
#define ror
//auto padding
#define STR_MERGE_IMPL(a, b) a##b
#define STR_MERGE(a, b) STR_MERGE_IMPL(a, b)
#define MAKE_PAD(size) STR_MERGE(_pad, __COUNTER__)[size]
#define DEFINE_MEMBER_N(type, name, offset) struct {unsigned char MAKE_PAD(offset); type name;}
#define is_valid_ptr(p) ((uintptr_t)(p) <= 0x7FFFFFFEFFFF && (uintptr_t)(p) >= 0x1000)
#define is_bad_ptr(p) (!is_valid_ptr(p))
namespace menu_setting
{
extern int Tab;
}
namespace sdk
{
enum BONE_INDEX : unsigned long
{
BONE_POS_HELMET = 8,
BONE_POS_HEAD = 7,
BONE_POS_NECK = 6,
BONE_POS_CHEST = 5,
BONE_POS_MID = 4,
BONE_POS_TUMMY = 3,
BONE_POS_PELVIS = 2,
BONE_POS_RIGHT_FOOT_1 = 21,
BONE_POS_RIGHT_FOOT_2 = 22,
BONE_POS_RIGHT_FOOT_3 = 23,
BONE_POS_RIGHT_FOOT_4 = 24,
BONE_POS_LEFT_FOOT_1 = 17,
BONE_POS_LEFT_FOOT_2 = 18,
BONE_POS_LEFT_FOOT_3 = 19,
BONE_POS_LEFT_FOOT_4 = 20,
BONE_POS_LEFT_HAND_1 = 13,
BONE_POS_LEFT_HAND_2 = 14,
BONE_POS_LEFT_HAND_3 = 15,
BONE_POS_LEFT_HAND_4 = 16,
BONE_POS_RIGHT_HAND_1 = 9,
BONE_POS_RIGHT_HAND_2 = 10,
BONE_POS_RIGHT_HAND_3 = 11,
BONE_POS_RIGHT_HAND_4 = 12
};
enum STANCE : int
{
STAND = 0,
CROUNCH = 1,
PRONE = 2,
KNOCKED = 3
};
class name_t {
public:
uint32_t idx;
char name[0x24];
uint8_t unk1[0x64];
uint32_t health;
};
class refdef_t {
public:
char pad_0000[8]; //0x0000
__int32 Width; //0x0008
__int32 Height; //0x000C
float FovX; //0x0010
float FovY; //0x0014
float Unk; //0x0018
char pad_001C[8]; //0x001C
vec3_t ViewAxis[3]; //0x0024
};
class Result
{
public:
bool hasResult;
float a;
float b;
};
struct velocityInfo_t
{
vec3_t lastPos;
vec3_t delta;
};
class player_t
{
public:
player_t(uintptr_t address) {
this->address = address;
}
uintptr_t address{};
uint32_t get_index();
bool is_valid();
bool is_visible();
bool is_dead();
int team_id();
int get_stance();
vec3_t get_pos();
float get_rotation();
int weapon_index();
};
struct loot {
auto get_name() -> char*;
auto is_valid() -> bool;
auto get_position()->vec3_t;
};
struct loot_definition_t
{
char name[50];
char text[50];
bool* show = NULL;
};
class WeaponDef
{
char pad0000[0x404];
int iProjectileSpeed;
};
class WeaponCompleteDef
{
public:
char* szInternalName; //0x0000
WeaponDef* weapDef; //0x0008
char* szDisplayName; //0x0010
char* hideTags; //0x0018
char pad_0020[552]; //0x0020
char* szAltWeaponName; //0x0248
char pad_0250[32]; //0x0250
}; //Size: 0x0270
vec3_t get_camera_location();
bool WorldToScreen(const vec3_t& WorldPos, vec2_t* ScreenPos);
float units_to_m(float units);
void rotation_point_alpha(float x, float y, float z, float alpha, vec3_t* outVec3);
bool w2s(const vec3_t& WorldPos, vec2_t* ScreenPos, vec2_t* BoxSize);
bool head_to_screen(vec3_t pos, vec2_t* pos_out, int stance);
bool bones_to_screen(vec3_t* BonePosArray, vec2_t* ScreenPosArray, const long Count);
bool is_valid_bone(vec3_t origin, vec3_t* bone, const long Count);
bool in_game();
int get_max_player_count();
int local_index();
name_t* get_name_ptr(int i);
refdef_t* get_refdef();
vec3_t get_camera_pos();
player_t get_player(int i);
player_t get_local_player();
std::string get_player_name(int i);
bool get_bone_by_player_index(int i, int bone_index, vec3_t* Out_bone_pos);
void no_recoil();
void enable_uav();
int get_player_health(int i);
void start_tick();
void update_vel_map(int index, vec3_t vPos);
void clear_vel_map();
vec3_t get_speed(int index);
vec3_t get_prediction(int index, vec3_t source, vec3_t destination);
vec3_t get_prediction(int index, vec3_t source, vec3_t bone, vec3_t position);
vec3_t prediction_solver(vec3_t local_pos, vec3_t position, int index, float bullet_speed);
uintptr_t get_visible_base();
auto get_loot_by_id(const uint32_t id)->loot*;
int get_client_count();
void CBuff(std::string newcmd);
}
namespace decryption
{
uint64_t get_client_info();
uint64_t get_client_info_base();
uint64_t get_bone_ptr();
uint16_t get_bone_index(uint32_t index);
}
namespace g_data
{
extern HWND hWind;
extern uintptr_t base;
extern uintptr_t peb;
extern uintptr_t visible_base;
extern sdk::refdef_t* refdef;
extern sdk::refdef_t refdef2;
extern FARPROC Targetbitblt;
extern FARPROC TargetStretchbitblt;
extern FARPROC Target_NtGdiBitBlt;
extern HMODULE dx9rot;
void init();
}
namespace g_draw
{
void draw_line(const ImVec2& from, const ImVec2& to, uint32_t color, float thickness);
void draw_box(const float x, const float y, const float width, const float height, const uint32_t color, float thickness);
void draw_corned_box(const vec2_t& rect, const vec2_t& size, uint32_t color, float thickness);
void fill_rectangle(const float x, const float y, const float width, const float hight, const uint32_t color);
void draw_circle(const ImVec2& position, float radius, uint32_t color, float thickness);
void draw_sketch_edge_text(ImFont* pFont, const std::string& text, const ImVec2& pos, float size, uint32_t color, bool center, uint32_t EdgeColor = 0xFF000000);
void draw_crosshair();
void draw_fov(const float aimbot_fov);
void draw_bones(unsigned long i, vec3_t origem, DWORD color);
void draw_health(int i_health, vec3_t pos);
}
namespace globals
{
extern bool b_in_game;
extern bool local_is_alive;
extern bool is_aiming;
extern int max_player_count;
/*extern const char* aim_lock_point[];
extern const char* aim_lock_key[];
extern const const char* aim_priority_opt[];
extern const const char* unlock_opt[];*/
extern uintptr_t refdef_ptr;
extern uintptr_t local_ptr;
extern uintptr_t player_ptr;
extern vec3_t local_pos;
extern uintptr_t clientinfo;
extern uintptr_t clientinfobase;
}
namespace colors
{
extern ImColor Color;
extern ImColor VisibleColorTeam;
extern ImColor NotVisibleColorTeam;
extern ImColor VisibleColorEnemy;
extern ImColor NotVisibleColorEnemy;
extern ImColor radar_bg_color;
extern ImColor radar_boarder_color;
}
namespace screenshot
{
extern bool visuals;
extern bool* pDrawEnabled;
extern int screenshot_counter;
extern uint32_t bit_blt_log;
extern const char* bit_blt_fail;
extern uintptr_t bit_blt_anotherlog;
extern uint32_t GdiStretchBlt_log;
extern const char* GdiStretchBlt_fail;
extern uintptr_t GdiStretchBlt_anotherlog;
extern uintptr_t texture_copy_log;
extern uintptr_t virtualqueryaddr;
}
namespace g_radar {
void draw_entity(sdk::player_t local_entity, sdk::player_t entity, bool IsFriendly, bool IsAlive, DWORD color, ImVec2 window_pos, int radar_radius1);
void show_radar_background();
}