Новичок
-
Автор темы
- #1
Повторов нет посмотрел всё через ctrl+f ничего не найдено не могу понять в чём проблема код прикладываю помогите пж
entry.cpp:
#include "Entry.h"
#include <Interfaces/IVModelInfo.h>
#include "Hooks/Hooks.h"
void CGlobal_Entry::Load()
{
while (!GetModuleHandleW(L"mss32.dll"))
Sleep(100);
U::Offsets.Initialize();
//Interfaces
{
I::BaseClientDLL = U::Interface.Get<IBaseClientDLL*>("client.dll", "VClient017");
I::ClientEntityList = U::Interface.Get<IClientEntityList*>("client.dll", "VClientEntityList003");
I::GameMovement = U::Interface.Get<IGameMovement*>("client.dll", "GameMovement001");
I::ClientPrediction = U::Interface.Get<CPrediction*>("client.dll", "VClientPrediction001");
auto engine_factory = reinterpret_cast<CreateInterfaceFn>(GetProcAddress(GetModuleHandleA("engine.dll"), "CreateInterface"));
IVModelInfo* g_modelinfo = nullptr;
g_modelinfo = reinterpret_cast<IVModelInfo*>(engine_factory("VModelInfoClient006", nullptr));
I::EngineClient = U::Interface.Get<IVEngineClient*>("engine.dll", "VEngineClient014");
I::EngineVGui = U::Interface.Get<IEngineVGui*>("engine.dll", "VEngineVGui001");
I::EngineTrace = U::Interface.Get<IEngineTrace*>("engine.dll", "EngineTraceClient003");
I::RenderView = U::Interface.Get<IVRenderView*>("engine.dll", "VEngineRenderView014");
I::ModelRender = U::Interface.Get<IVModelRender*>("engine.dll", "VEngineModel016");
I::GameEventManager = U::Interface.Get<IGameEventManager2*>("engine.dll", "GAMEEVENTSMANAGER002");
I::ModelInfo = U::Interface.Get< IVModelInfo*>("engine.dll", "VModelInfoClient006");
I::StudioRender = U::Interface.Get<IStudioRender*>("studiorender.dll", "VStudioRender025");
I::MatSystemSurface = U::Interface.Get<IMatSystemSurface*>("vguimatsurface.dll", "VGUI_Surface030");
I::Cvar = U::Interface.Get<ICvar*>("vstdlib.dll", "VEngineCvar004");
//Other shenanigans
{
I::GlobalVars = [I]reinterpret_cast<CGlobalVarsBase*[/I]>(U::Offsets.m_dwGlobalVars + 0x8);
XASSERT(I::GlobalVars == nullptr);
I::PredictionPlayer = [I]reinterpret_cast<C_BasePlayer**[/I]>(U::Offsets.m_dwPredictionPlayer + 0x2);
XASSERT(I::PredictionPlayer == nullptr);
}
}
H::Draw.Initialize();
if (I::EngineClient->IsInGame())
g_Globals.m_nLocalIndex = I::EngineClient->GetLocalPlayer();
G::Hooks.Initialize();
I::Cvar->ConsoleColorPrintf({ 15, 150, 15, 255 }, "CGlobal_Entry::Lo_ad() finished!\n");
}
void CGlobal_Entry::Unload()
{
G::Hooks.Uninitialize();
Sleep(100);
H::Draw.Uninitialize();
Sleep(100);
I::Cvar->ConsoleColorPrintf({ 15, 150, 15, 255 }, " CGlobal_Entry::un_Load finished!\n");
}
entry.h:
#pragma once
#include "Hooks/Hooks.h"
class CGlobal_Entry
{
public:
void Load();
void Unload();
};
namespace G { inline CGlobal_Entry Entry; }
Последнее редактирование: