From 74e5397d33ece092e7f58aa27512578750d0aa0d Mon Sep 17 00:00:00 2001 From: shelru Date: Sat, 24 Sep 2016 16:31:23 +0300 Subject: [PATCH] Add files via upload --- MiniBase/client.cpp | 7 ++++--- MiniBase/offset.cpp | 10 +++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/MiniBase/client.cpp b/MiniBase/client.cpp index 65300c2..674c617 100644 --- a/MiniBase/client.cpp +++ b/MiniBase/client.cpp @@ -149,8 +149,9 @@ void InitHack(){ g_blockedCvars[g_blockedCvarCount++] = strdup(psKeyName2); psKeyName2 += strlen(psKeyName2) + 1; } + if (!(g_Engine.Con_IsVisible() != 0))g_Engine.pfnClientCmd("toggleconsole"); - ConsolePrintColor(0, 255, 11, "-- Extra Mirror v1.8\n"); + ConsolePrintColor(0, 255, 11, "-- Extra Mirror v1.8e\n"); ConsolePrintColor(255, 255, 255, "-- Use 'credits' for more information\n"); ConsolePrintColor(255, 255, 255, "-- Thank's to Realwar for title\n"); ConsolePrintColor(255, 255, 255, "-- Thank's to FightMagister for functions\n"); @@ -173,7 +174,6 @@ void InitHack(){ void HookEventMessages(){ pEventMsgBase = (PEventMsg)offset.FindEventMsgBase(); - pEvent_usp = HookEventMsg("events/usp.sc", Event_usp); pEvent_ak47 = HookEventMsg("events/ak47.sc", Event_ak47); pEvent_aug = HookEventMsg("events/aug.sc", Event_aug); pEvent_awp = HookEventMsg("events/awp.sc", Event_awp); @@ -209,7 +209,8 @@ void HookEventMessages(){ void HUD_Frame(double time){ if (!FirstFrame){ g_Screen.iSize = sizeof(SCREENINFO);offset.HLType = g_Studio.IsHardware() + 1;offset.ConsoleColorInitalize(); - offset.GetGameInfo(&BuildInfo);HookUserMessages(); HookEventMessages(); HookEngineMessages();InitHack();FirstFrame = true; + offset.GetGameInfo(&BuildInfo);HookUserMessages(); HookEngineMessages();InitHack();FirstFrame = true; + HookEventMessages(); } g_Engine.pfnGetScreenInfo(&g_Screen); g_Client.HUD_Frame(time); diff --git a/MiniBase/offset.cpp b/MiniBase/offset.cpp index 7744312..47ce1c2 100644 --- a/MiniBase/offset.cpp +++ b/MiniBase/offset.cpp @@ -55,7 +55,6 @@ bool cOffset::GetModuleInfo() void cOffset::Error(char* Msg) { MessageBoxA(0, Msg, OFF_ERROR, MB_OK | MB_ICONERROR); - ExitProcess(0); } DWORD cOffset::FindClientTable() @@ -239,11 +238,16 @@ DWORD cOffset::FindSVCMessages() return (DWORD)pEngineMsgBase; } +#define equali !stricmp DWORD cOffset::FindEventMsgBase() { DWORD PatternAddress = FindPattern(OFF_EVENT_MSG_BASE, HwBase, HwEnd, 0); - DWORD ReferenAddress = FindReference(HwBase, HwEnd, PatternAddress) - 0x07; - + DWORD ReferenAddress; + if (equali(BuildInfo.GameVersion,"4554")){ + ReferenAddress = FindReference(HwBase, HwEnd, PatternAddress) - 0x06; + } + else { ReferenAddress = FindReference(HwBase, HwEnd, PatternAddress) - 0x07; } + if (FarProc(ReferenAddress, HwBase, HwEnd)) { Error(OFF_EVENT_MSG_ERROR);