From 8f081346252a8108fb34c7959bbad2a807bd9838 Mon Sep 17 00:00:00 2001 From: 0TheSpy <5511c282@opayq.com> Date: Wed, 9 Nov 2022 06:36:54 +0300 Subject: [PATCH] Update Interfaces.cpp --- SpyCustom/Interfaces.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/SpyCustom/Interfaces.cpp b/SpyCustom/Interfaces.cpp index 246441d..b07b88d 100644 --- a/SpyCustom/Interfaces.cpp +++ b/SpyCustom/Interfaces.cpp @@ -225,3 +225,24 @@ void SetValueUnrestricted(const char* cvar, float value) SetFloatUnrestricted(cvar, value); SetIntUnrestricted(cvar, (int)value); } + +void NET_SetConVar(const char* name, const char* value) +{ + //__asm pushad + + static void* pvSetConVar = NULL; + + if (!pvSetConVar) + pvSetConVar = (void*)FindPatternV2(XorStr("engine.dll"), XorStr("8D 4C 24 1C E8 ? ? ? ? 56")); + + if (pvSetConVar) + Invoke_NET_SetConVar(pvSetConVar, name, value); + + //__asm popad +} + +void SetName(const char* pszName) +{ + static void* pvSetConVar = NULL; + NET_SetConVar(XorStr("name"), pszName); +}