From 0f473bba4e72f517538af4f543e830ba268bb7cf Mon Sep 17 00:00:00 2001 From: 8dcc <8dcc.git@gmail.com> Date: Sat, 22 Jul 2023 16:06:18 +0200 Subject: [PATCH] Call esp() from HUD_Redraw hook Draw localplayer pos bellow watermark --- src/hooks.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/hooks.c b/src/hooks.c index 50da349..bd88fc4 100644 --- a/src/hooks.c +++ b/src/hooks.c @@ -4,6 +4,7 @@ #include "include/globals.h" #include "features/include/movement.h" +#include "features/include/esp.h" DECL_HOOK(CL_CreateMove); DECL_HOOK(HUD_Redraw); @@ -31,5 +32,14 @@ int h_HUD_Redraw(float time, int intermission) { i_engine->pfnDrawSetTextColor(1, 1, 1); i_engine->pfnDrawConsoleString(5, 5, "8dcc/hl-cheat"); + char pos[100]; + sprintf(pos, "x: %f, y: %f, z: %f", localplayer->origin[0], + localplayer->origin[1], localplayer->origin[2]); + + i_engine->pfnDrawSetTextColor(1, 1, 1); + i_engine->pfnDrawConsoleString(5, 20, pos); + + esp(); + return ret; }