#include "r2engine.h" Cbuf_GetCurrentPlayerType Cbuf_GetCurrentPlayer; Cbuf_AddTextType Cbuf_AddText; Cbuf_ExecuteType Cbuf_Execute; bool (*CCommand__Tokenize)(CCommand& self, const char* pCommandString, cmd_source_t commandSource); CEngine* g_pEngine; void (*CBaseClient__Disconnect)(void* self, uint32_t unknownButAlways1, const char* reason, ...); CBaseClient* g_pClientArray; server_state_t* g_pServerState; char* g_pModName = nullptr; // we cant set this up here atm since we dont have an offset to it in engine, instead we store it in IsRespawnMod CGlobalVars* g_pGlobals; ON_DLL_LOAD("engine.dll", R2Engine, (CModule module)) { Cbuf_GetCurrentPlayer = module.Offset(0x120630).RCast(); Cbuf_AddText = module.Offset(0x1203B0).RCast(); Cbuf_Execute = module.Offset(0x1204B0).RCast(); CCommand__Tokenize = module.Offset(0x418380).RCast(); g_pEngine = module.Offset(0x7D70C8).Deref().RCast(); CBaseClient__Disconnect = module.Offset(0x1012C0).RCast(); g_pClientArray = module.Offset(0x12A53F90).RCast(); g_pServerState = module.Offset(0x12A53D48).RCast(); g_pGlobals = module.Offset(0x7C6F70).RCast(); }