Update Interfaces.cpp

This commit is contained in:
0TheSpy 2022-11-09 06:36:54 +03:00 committed by GitHub
parent 5a47bc0469
commit 8f08134625
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}