Merge pull request #90 from IMXNOOBX/experimental
Update offsets & Update head tracker to use F9 & Skeleton to use F8
This commit is contained in:
@@ -24,6 +24,8 @@ namespace config {
|
|||||||
show_box_esp = data["show_box_esp"];
|
show_box_esp = data["show_box_esp"];
|
||||||
if (data["show_skeleton_esp"].is_boolean())
|
if (data["show_skeleton_esp"].is_boolean())
|
||||||
show_skeleton_esp = data["show_skeleton_esp"];
|
show_skeleton_esp = data["show_skeleton_esp"];
|
||||||
|
if (data["show_head_tracker"].is_boolean())
|
||||||
|
show_head_tracker = data["show_head_tracker"];
|
||||||
if (data["team_esp"].is_boolean())
|
if (data["team_esp"].is_boolean())
|
||||||
team_esp = data["team_esp"];
|
team_esp = data["team_esp"];
|
||||||
if (data["automatic_update"].is_boolean())
|
if (data["automatic_update"].is_boolean())
|
||||||
@@ -96,6 +98,7 @@ namespace config {
|
|||||||
|
|
||||||
data["show_box_esp"] = show_box_esp;
|
data["show_box_esp"] = show_box_esp;
|
||||||
data["show_skeleton_esp"] = show_skeleton_esp;
|
data["show_skeleton_esp"] = show_skeleton_esp;
|
||||||
|
data["show_head_tracker"] = show_head_tracker;
|
||||||
data["team_esp"] = team_esp;
|
data["team_esp"] = team_esp;
|
||||||
data["automatic_update"] = automatic_update;
|
data["automatic_update"] = automatic_update;
|
||||||
data["render_distance"] = render_distance;
|
data["render_distance"] = render_distance;
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ namespace config {
|
|||||||
inline int flag_render_distance = 200;
|
inline int flag_render_distance = 200;
|
||||||
inline bool show_box_esp = true;
|
inline bool show_box_esp = true;
|
||||||
inline bool show_skeleton_esp = false;
|
inline bool show_skeleton_esp = false;
|
||||||
|
inline bool show_head_tracker = false;
|
||||||
inline bool show_extra_flags = false;
|
inline bool show_extra_flags = false;
|
||||||
|
|
||||||
inline RGB esp_box_color_team = { 75, 175, 75 };
|
inline RGB esp_box_color_team = { 75, 175, 75 };
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ namespace hack {
|
|||||||
float distance = g_game.localOrigin.calculate_distance(player->origin);
|
float distance = g_game.localOrigin.calculate_distance(player->origin);
|
||||||
int roundedDistance = std::round(distance / 10.f);
|
int roundedDistance = std::round(distance / 10.f);
|
||||||
|
|
||||||
if (config::show_skeleton_esp) {
|
if (config::show_head_tracker) {
|
||||||
render::DrawCircle(
|
render::DrawCircle(
|
||||||
g::hdcBuffer,
|
g::hdcBuffer,
|
||||||
player->bones.bonePositions["head"].x,
|
player->bones.bonePositions["head"].x,
|
||||||
@@ -67,7 +67,9 @@ namespace hack {
|
|||||||
width / 5,
|
width / 5,
|
||||||
(g_game.localTeam == player->team ? config::esp_skeleton_color_team : config::esp_skeleton_color_enemy)
|
(g_game.localTeam == player->team ? config::esp_skeleton_color_team : config::esp_skeleton_color_enemy)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (config::show_skeleton_esp) {
|
||||||
// render::DrawLine(g::hdcBuffer, player->bones.bonePositions["head"].x, player->bones.bonePositions["head"].y, player->bones.bonePositions["neck_0"].x, player->bones.bonePositions["neck_0"].y, g_game.localTeam == player->team ? config::esp_skeleton_color_team : config::esp_skeleton_color_enemy);
|
// render::DrawLine(g::hdcBuffer, player->bones.bonePositions["head"].x, player->bones.bonePositions["head"].y, player->bones.bonePositions["neck_0"].x, player->bones.bonePositions["neck_0"].y, g_game.localTeam == player->team ? config::esp_skeleton_color_team : config::esp_skeleton_color_enemy);
|
||||||
render::DrawLine(g::hdcBuffer, player->bones.bonePositions["neck_0"].x, player->bones.bonePositions["neck_0"].y, player->bones.bonePositions["spine_1"].x, player->bones.bonePositions["spine_1"].y, g_game.localTeam == player->team ? config::esp_skeleton_color_team : config::esp_skeleton_color_enemy);
|
render::DrawLine(g::hdcBuffer, player->bones.bonePositions["neck_0"].x, player->bones.bonePositions["neck_0"].y, player->bones.bonePositions["spine_1"].x, player->bones.bonePositions["spine_1"].y, g_game.localTeam == player->team ? config::esp_skeleton_color_team : config::esp_skeleton_color_enemy);
|
||||||
render::DrawLine(g::hdcBuffer, player->bones.bonePositions["spine_1"].x, player->bones.bonePositions["spine_1"].y, player->bones.bonePositions["spine_2"].x, player->bones.bonePositions["spine_2"].y, g_game.localTeam == player->team ? config::esp_skeleton_color_team : config::esp_skeleton_color_enemy);
|
render::DrawLine(g::hdcBuffer, player->bones.bonePositions["spine_1"].x, player->bones.bonePositions["spine_1"].y, player->bones.bonePositions["spine_2"].x, player->bones.bonePositions["spine_2"].y, g_game.localTeam == player->team ? config::esp_skeleton_color_team : config::esp_skeleton_color_enemy);
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ void CGame::loop() {
|
|||||||
if (player.health <= 0 || player.health > 100) continue;
|
if (player.health <= 0 || player.health > 100) continue;
|
||||||
|
|
||||||
if (config::team_esp && (player.pCSPlayerPawn == localPlayer)) continue;
|
if (config::team_esp && (player.pCSPlayerPawn == localPlayer)) continue;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Unused for now, but for a vis check
|
* Unused for now, but for a vis check
|
||||||
*
|
*
|
||||||
@@ -156,6 +156,12 @@ void CGame::loop() {
|
|||||||
player.ReadBones();
|
player.ReadBones();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config::show_head_tracker && !config::show_skeleton_esp) {
|
||||||
|
player.gameSceneNode = process->read<uint64_t>(player.pCSPlayerPawn + 0x310);
|
||||||
|
player.boneArray = process->read<uint64_t>(player.gameSceneNode + 0x160 + 0x80);
|
||||||
|
player.ReadHead();
|
||||||
|
}
|
||||||
|
|
||||||
if (config::show_extra_flags) {
|
if (config::show_extra_flags) {
|
||||||
/*
|
/*
|
||||||
* Reading values for extra flags is now seperated from the other reads
|
* Reading values for extra flags is now seperated from the other reads
|
||||||
@@ -187,12 +193,22 @@ void CGame::loop() {
|
|||||||
players.assign(list.begin(), list.end());
|
players.assign(list.begin(), list.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uintptr_t boneAddress;
|
||||||
|
Vector3 bonePosition;
|
||||||
|
int boneIndex;
|
||||||
|
void CPlayer::ReadHead() {
|
||||||
|
boneAddress = boneArray + 6 * 32;
|
||||||
|
bonePosition = g_game.process->read<Vector3>(boneAddress);
|
||||||
|
bones.bonePositions["head"] = g_game.world_to_screen(&bonePosition);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void CPlayer::ReadBones() {
|
void CPlayer::ReadBones() {
|
||||||
for (const auto& entry : boneMap) {
|
for (const auto& entry : boneMap) {
|
||||||
const std::string& boneName = entry.first;
|
const std::string& boneName = entry.first;
|
||||||
int boneIndex = entry.second;
|
boneIndex = entry.second;
|
||||||
uintptr_t boneAddress = boneArray + boneIndex * 32;
|
boneAddress = boneArray + boneIndex * 32;
|
||||||
Vector3 bonePosition = g_game.process->read<Vector3>(boneAddress);
|
bonePosition = g_game.process->read<Vector3>(boneAddress);
|
||||||
bones.bonePositions[boneName] = g_game.world_to_screen(&bonePosition);
|
bones.bonePositions[boneName] = g_game.world_to_screen(&bonePosition);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ public:
|
|||||||
float flashAlpha;
|
float flashAlpha;
|
||||||
std::string weapon;
|
std::string weapon;
|
||||||
void ReadBones();
|
void ReadBones();
|
||||||
|
void ReadHead();
|
||||||
};
|
};
|
||||||
|
|
||||||
class CGame
|
class CGame
|
||||||
|
|||||||
@@ -143,9 +143,9 @@ int main() {
|
|||||||
std::thread read(read_thread);
|
std::thread read(read_thread);
|
||||||
|
|
||||||
#ifndef _UC
|
#ifndef _UC
|
||||||
std::cout << "\n[settings] In Game keybinds:\n\t[F4] enable/disable Box ESP\n\t[F5] enable/disable Team ESP\n\t[F6] enable/disable automatic updates\n\t[F7] enable/disable extra flags\n\t[F8] enable/disable skeleton esp\n\t[end] Unload esp.\n" << std::endl;
|
std::cout << "\n[settings] In Game keybinds:\n\t[F4] enable/disable Box ESP\n\t[F5] enable/disable Team ESP\n\t[F6] enable/disable automatic updates\n\t[F7] enable/disable extra flags\n\t[F8] enable/disable skeleton esp\n\t[F9] enable/disable head tracker\n\t[end] Unload esp.\n" << std::endl;
|
||||||
#else
|
#else
|
||||||
std::cout << "\n[settings] In Game keybinds:\n\t[F4] enable/disable Box ESP\n\t[F5] enable/disable Team ESP\n\t[F7] enable/disable extra flags[F8] enable/disable skeleton esp\n\t[end] Unload esp.\n" << std::endl;
|
std::cout << "\n[settings] In Game keybinds:\n\t[F4] enable/disable Box ESP\n\t[F5] enable/disable Team ESP\n\t[F7] enable/disable extra flags\n\t[F8] enable/disable skeleton esp\n\t[F9] enable/disable head tracker\n\t[end] Unload esp.\n" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
std::cout << "[settings] Make sure you check the config for additional settings!" << std::endl;
|
std::cout << "[settings] Make sure you check the config for additional settings!" << std::endl;
|
||||||
|
|
||||||
@@ -165,6 +165,8 @@ int main() {
|
|||||||
|
|
||||||
if (GetAsyncKeyState(VK_F8) & 0x8000) { config::show_skeleton_esp = !config::show_skeleton_esp; config::save(); Beep(700, 100); };
|
if (GetAsyncKeyState(VK_F8) & 0x8000) { config::show_skeleton_esp = !config::show_skeleton_esp; config::save(); Beep(700, 100); };
|
||||||
|
|
||||||
|
if (GetAsyncKeyState(VK_F9) & 0x8000) { config::show_head_tracker = !config::show_head_tracker; config::save(); Beep(700, 100); };
|
||||||
|
|
||||||
TranslateMessage(&msg);
|
TranslateMessage(&msg);
|
||||||
DispatchMessage(&msg);
|
DispatchMessage(&msg);
|
||||||
|
|
||||||
|
|||||||
+16
-17
@@ -1,26 +1,25 @@
|
|||||||
{
|
{
|
||||||
"build_number": 13968,
|
"build_number": 13969,
|
||||||
"dwLocalPlayer": 25152952,
|
|
||||||
"dwEntityList": 24828640,
|
|
||||||
"dwViewMatrix": 25215200,
|
|
||||||
"dwBuildNumber": 4764964,
|
"dwBuildNumber": 4764964,
|
||||||
"dwPlantedC4": 25234632,
|
"dwEntityList": 24828656,
|
||||||
|
"dwLocalPlayer": 25152968,
|
||||||
|
"dwPlantedC4": 25234648,
|
||||||
|
"dwViewMatrix": 25215232,
|
||||||
|
"m_ArmorValue": 5384,
|
||||||
|
"m_bIsDefusing": 5008,
|
||||||
"m_flC4Blow": 3760,
|
"m_flC4Blow": 3760,
|
||||||
|
"m_flFlashOverlayAlpha": 5212,
|
||||||
"m_flNextBeep": 3756,
|
"m_flNextBeep": 3756,
|
||||||
"m_flTimerLength": 3768,
|
"m_flTimerLength": 3768,
|
||||||
"m_pInGameMoneyServices": 1744,
|
"m_hPlayerPawn": 2004,
|
||||||
"m_iAccount": 64,
|
"m_iAccount": 64,
|
||||||
"m_vecAbsOrigin": 200,
|
|
||||||
"m_vOldOrigin": 4644,
|
|
||||||
"m_pGameSceneNode": 784,
|
|
||||||
"m_flFlashOverlayAlpha": 5212,
|
|
||||||
"m_bIsDefusing": 5032,
|
|
||||||
"m_szName": 3096,
|
|
||||||
"m_pClippingWeapon": 4776,
|
|
||||||
"m_ArmorValue": 5384,
|
|
||||||
"m_iHealth": 812,
|
"m_iHealth": 812,
|
||||||
"m_hPlayerPawn": 1980,
|
|
||||||
"m_sSanitizedPlayerName": 1824,
|
|
||||||
"m_iTeamNum": 959,
|
"m_iTeamNum": 959,
|
||||||
"m_vecOrigin": 4644
|
"m_pClippingWeapon": 4776,
|
||||||
|
"m_pGameSceneNode": 784,
|
||||||
|
"m_pInGameMoneyServices": 1744,
|
||||||
|
"m_sSanitizedPlayerName": 1848,
|
||||||
|
"m_szName": 3096,
|
||||||
|
"m_vOldOrigin": 4644,
|
||||||
|
"m_vecAbsOrigin": 200
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user