General Improvements
**Head Tracker** - Makes head tracker distance based - Makes circle an outline of a circle rather than filled - Adjusted circle to be more oval shape to fit character heads - Added toggle feature to head tracker as requested by many **Handle Hijack** - Changed permissions for hijacked handle from all access to permissions of svchost.exe, which still allows read and write memory, but removes the all access permissions, looking more "legit" to VAC **Offsets** - Update offsets for game build 13968
This commit is contained in:
@@ -20,6 +20,8 @@ namespace config {
|
||||
if (data.empty())
|
||||
return false;
|
||||
|
||||
if (data["show_head_tracker"].is_boolean())
|
||||
show_head_tracker = data["show_head_tracker"];
|
||||
if (data["team_esp"].is_boolean())
|
||||
team_esp = data["team_esp"];
|
||||
if (data["automatic_update"].is_boolean())
|
||||
@@ -63,23 +65,18 @@ namespace config {
|
||||
};
|
||||
}
|
||||
|
||||
//if (data["show_distance"].is_boolean())
|
||||
// show_distance = data["show_distance"];
|
||||
//if (data["show_armor"].is_boolean())
|
||||
// show_armor = data["show_armor"];
|
||||
//if (data["rainbow"].is_boolean())
|
||||
// rainbow = data["rainbow"];
|
||||
//if (data["rainbow_speed"].is_number())
|
||||
// rainbow_speed = data["rainbow_speed"];
|
||||
//if (data["head_tracker"].is_boolean())
|
||||
// head_tracker = data["head_tracker"];
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void save() {
|
||||
json data;
|
||||
|
||||
|
||||
data["show_head_tracker"] = show_head_tracker;
|
||||
data["team_esp"] = team_esp;
|
||||
data["automatic_update"] = automatic_update;
|
||||
data["render_distance"] = render_distance;
|
||||
@@ -91,11 +88,8 @@ namespace config {
|
||||
data["esp_name_color"] = { esp_name_color.r, esp_name_color.g, esp_name_color.b };
|
||||
data["esp_distance_color"] = { esp_distance_color.r, esp_distance_color.g, esp_distance_color.b };
|
||||
|
||||
//data["show_distance"] = show_distance;
|
||||
//data["show_armor"] = show_armor;
|
||||
//data["rainbow"] = rainbow;
|
||||
//data["rainbow_speed"] = rainbow_speed;
|
||||
//data["head_tracker"] = head_tracker;
|
||||
|
||||
std::ofstream output(file_path);
|
||||
output << std::setw(4) << data << std::endl;
|
||||
|
||||
@@ -28,6 +28,7 @@ namespace config {
|
||||
inline float render_distance = -1.f;
|
||||
inline int flag_render_distance = 200;
|
||||
inline bool show_extra_flags = false;
|
||||
inline bool show_head_tracker = false;
|
||||
|
||||
inline RGB esp_box_color_team = { 75, 175, 75 };
|
||||
inline RGB esp_box_color_enemy = { 175, 75, 75 };
|
||||
|
||||
@@ -5,13 +5,13 @@ namespace render
|
||||
{
|
||||
void DrawCircle(HDC hdc, int x, int y, int radius, COLORREF color)
|
||||
{
|
||||
HBRUSH hBrush = CreateSolidBrush(color);
|
||||
HBRUSH hOldBrush = (HBRUSH)SelectObject(hdc, hBrush);
|
||||
HPEN hPen = CreatePen(PS_SOLID, 2, color);
|
||||
HPEN hOldPen = (HPEN)SelectObject(hdc, hPen);
|
||||
|
||||
Ellipse(hdc, x - radius, y - radius, x + radius, y + radius);
|
||||
Arc(hdc, x - radius, y - radius, x + radius, y + radius + 4, 0, 0, 0, 0);
|
||||
|
||||
SelectObject(hdc, hOldBrush);
|
||||
DeleteObject(hBrush);
|
||||
SelectObject(hdc, hOldPen);
|
||||
DeleteObject(hPen);
|
||||
}
|
||||
|
||||
void DrawBorderBox(HDC hdc, int x, int y, int w, int h, COLORREF borderColor)
|
||||
|
||||
@@ -128,9 +128,7 @@ namespace hack {
|
||||
if (origin.x == localOrigin.x && origin.y == localOrigin.y && origin.z == localOrigin.z)
|
||||
continue;
|
||||
|
||||
const uintptr_t gamescene = process->read<uint64_t>(pCSPlayerPawn + 0x310);
|
||||
const uintptr_t bonearray = process->read<uint64_t>(gamescene + 0x160 + 0x80);
|
||||
const Vector3 headPos = process->read<Vector3>(bonearray + 6 * 32);
|
||||
|
||||
|
||||
if (config::render_distance != -1 && (localOrigin - origin).length2d() > config::render_distance)
|
||||
continue;
|
||||
@@ -140,24 +138,30 @@ namespace hack {
|
||||
|
||||
const Vector3 screenPos = origin.world_to_screen(view_matrix);
|
||||
const Vector3 screenHead = head.world_to_screen(view_matrix);
|
||||
const Vector3 screenHeadPos = headPos.world_to_screen(view_matrix);
|
||||
|
||||
|
||||
if (screenPos.z >= 0.01f) {
|
||||
const float height = screenPos.y - screenHead.y;
|
||||
const float width = height / 2.4f;
|
||||
const float head_height = (screenHeadPos.y - screenHeadPos.y) / 8;
|
||||
const float head_width = (head_height / 2.4f) / 4;
|
||||
|
||||
float distance = localOrigin.calculate_distance(origin);
|
||||
int roundedDistance = std::round(distance / 10.f);
|
||||
|
||||
render::DrawCircle(
|
||||
g::hdcBuffer,
|
||||
screenHeadPos.x,
|
||||
screenHeadPos.y,
|
||||
5,
|
||||
config::esp_box_color_enemy
|
||||
);
|
||||
if (config::show_head_tracker)
|
||||
{
|
||||
const uintptr_t gamescene = process->read<uint64_t>(pCSPlayerPawn + 0x310);
|
||||
const uintptr_t bonearray = process->read<uint64_t>(gamescene + 0x160 + 0x80);
|
||||
const Vector3 headPos = process->read<Vector3>(bonearray + 6 * 32);
|
||||
const Vector3 screenHeadPos = headPos.world_to_screen(view_matrix);
|
||||
|
||||
render::DrawCircle(
|
||||
g::hdcBuffer,
|
||||
screenHeadPos.x,
|
||||
screenHeadPos.y,
|
||||
width / 5,
|
||||
config::esp_box_color_enemy
|
||||
);
|
||||
}
|
||||
|
||||
render::DrawBorderBox(
|
||||
g::hdcBuffer,
|
||||
|
||||
@@ -147,9 +147,9 @@ int main() {
|
||||
//SetActiveWindow(hack::process->hwnd_);
|
||||
|
||||
#ifndef _UC
|
||||
std::cout << "\n[settings] In Game keybinds:\n\t[F5] enable/disable Team ESP\n\t[F6] enable/disable automatic updates\n\t[F7] enable/disable extra flags\n\t[end] Unload esp.\n" << std::endl;
|
||||
std::cout << "\n[settings] In Game keybinds:\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 head tracker circle\n\t[end] Unload esp.\n" << std::endl;
|
||||
#else
|
||||
std::cout << "\n[settings] In Game keybinds:\n\t[F5] enable/disable Team ESP\n\t[F7] enable/disable extra flags\n\t[end] Unload esp\n" << std::endl;
|
||||
std::cout << "\n[settings] In Game keybinds:\n\t[F5] enable/disable Team ESP\n\t[F7] enable/disable extra flags[F8] enable/disable head tracker circle\n\t[end] Unload esp.\n" << std::endl;
|
||||
#endif
|
||||
std::cout << "[settings] Make sure you check the config for additional settings!" << std::endl;
|
||||
|
||||
@@ -165,6 +165,8 @@ int main() {
|
||||
#endif
|
||||
if (GetAsyncKeyState(VK_F7) & 0x8000) { config::show_extra_flags = !config::show_extra_flags; config::save(); Beep(700, 100); };
|
||||
|
||||
if (GetAsyncKeyState(VK_F8) & 0x8000) { config::show_head_tracker = !config::show_head_tracker; config::save(); Beep(700, 100); };
|
||||
|
||||
TranslateMessage(&msg);
|
||||
DispatchMessage(&msg);
|
||||
|
||||
|
||||
@@ -259,7 +259,7 @@ namespace hj {
|
||||
|
||||
|
||||
//we duplicate the handle another process has to our target into our cheat with whatever permissions we want. I did all access.
|
||||
NtRet = NtDuplicateObject(procHandle, (HANDLE)hInfo->Handles[i].Handle, NtCurrentProcess, &HijackedHandle, PROCESS_ALL_ACCESS, 0, 0);
|
||||
NtRet = NtDuplicateObject(procHandle, (HANDLE)hInfo->Handles[i].Handle, NtCurrentProcess, &HijackedHandle, PROCESS_QUERY_INFORMATION | PROCESS_VM_OPERATION | PROCESS_VM_READ | PROCESS_VM_WRITE | PROCESS_DUP_HANDLE, 0, 0);
|
||||
if (!IsHandleValid(HijackedHandle) || !NT_SUCCESS(NtRet))//check is the funcions succeeded and check the handle is valid
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user