
Originally Posted by
WildAssassinz
can i see your init interfaces?
Code:
void Interfaces::InitFactories()
{
Interfaces::ClientFactory = Interfaces::GetFactory(Modules::Client);
Interfaces::EngineFactory = Interfaces::GetFactory(Modules::Engine);
Interfaces::VGUI2Factory = Interfaces::GetFactory(Modules::VGUI2);
Interfaces::VGUISurfaceFactory = Interfaces::GetFactory(Modules::VGUISurface);
Interfaces::MatFactory = Interfaces::GetFactory(Modules::Material);
Interfaces::PhysFactory = Interfaces::GetFactory(Modules::VPhysics);
Interfaces::StdFactory = Interfaces::GetFactory(Modules::Stdlib);
}
void Interfaces::InitInterfaces()
{
Interfaces::InitFactories();
Interfaces::Client = (IBaseClientDLL*)Interfaces::ClientFactory((char*)Utilities::FindTextPattern(XorStr("client.dll"), XorStr("VClient0")), NULL);
Interfaces::Engine = (IVEngineClient*)Interfaces::EngineFactory((char*)Utilities::FindTextPattern(XorStr("engine.dll"), XorStr("VEngineClient0")), NULL);
Interfaces::Panels = (IPanel*)Interfaces::VGUI2Factory((char*)Utilities::FindTextPattern(XorStr("vgui2.dll"), XorStr("VGUI_Panel0")), NULL);
Interfaces::Surface = (ISurface*)Interfaces::VGUISurfaceFactory((char*)Utilities::FindTextPattern(XorStr("vguimatsurface.dll"), XorStr("VGUI_Surface0")), NULL);
Interfaces::EntList = (IClientEntityList*)Interfaces::ClientFactory((char*)Utilities::FindTextPattern(XorStr("client.dll"), XorStr("VClientEntityList0")), NULL);
Interfaces::DebugOverlay = (IVDebugOverlay*)Interfaces::EngineFactory((char*)Utilities::FindTextPattern(XorStr("engine.dll"), XorStr("VDebugOverlay0")), NULL);
Interfaces::Prediction = (DWORD*)Interfaces::ClientFactory((char*)Utilities::FindTextPattern(XorStr("client.dll"), XorStr("VClientPrediction0")), NULL);
Interfaces::MaterialSystem = (CMaterialSystem*)Interfaces::MatFactory((char*)Utilities::FindTextPattern(XorStr("materialsystem.dll"), XorStr("VMaterialSystem0")), NULL);
Interfaces::RenderView = (CVRenderView*)Interfaces::EngineFactory((char*)Utilities::FindTextPattern(XorStr("engine.dll"), XorStr("VEngineRenderView0")), NULL);
Interfaces::ModelRender = (IVModelRender*)Interfaces::EngineFactory((char*)Utilities::FindTextPattern(XorStr("engine.dll"), XorStr("VEngineModel0")), NULL);
Interfaces::ModelInfo = (CModelInfo*)Interfaces::EngineFactory((char*)Utilities::FindTextPattern(XorStr("engine.dll"), XorStr("VModelInfoClient0")), NULL);
Interfaces::Trace = (IEngineTrace*)Interfaces::EngineFactory((char*)Utilities::FindTextPattern(XorStr("engine.dll"), XorStr("EngineTraceClient0")), NULL);
Interfaces::PhysProps = (IPhysicsSurfaceProps*)Interfaces::PhysFactory((char*)Utilities::FindTextPattern(XorStr("vphysics.dll"), XorStr("VPhysicsSurfaceProps0")), NULL);
Interfaces::CVar = (ICVar*)Interfaces::StdFactory((char*)Utilities::FindTextPattern(XorStr("stdlib.dll"), XorStr("VEngineCvar00")), NULL);
// Get ClientMode Pointer
DWORD* ppClientMode;
ppClientMode = nullptr; // before "scripts/vgui_screens.txt"
DWORD p = Utilities::FindSignature("client.dll", "8B 35 ? ? ? ? 85 FF 74 73");
if (p)
{
ppClientMode = **(DWORD***)(p + 2);
Interfaces::ClientMode = ppClientMode;
}
auto uAddress = Utilities::FindSignature(XorStr("client.dll"), XorStr("A1 ? ? ? ? 5F 8B 40 10"));
uint32_t g_dwGlobalVarsBase = *(uint32_t*)(uAddress + 0x1);
Interfaces::Globals = *(CGlobalVarsBase**)(g_dwGlobalVarsBase);
Utilities::Log(XorStr("Interfaces Ready"));
}
I noticed that the initinterfaces uses the log function, so I put the open console before the initinterfaces, but it still does not work. Also, it never logs,so it has to be freezing at InitFactories or somewhere else.