Update dllmain.cpp

This commit is contained in:
0TheSpy
2022-11-13 23:52:27 +03:00
committed by GitHub
parent 759e952e12
commit f04face692

View File

@ -145,10 +145,15 @@ void OnLoadCfg()
} }
Sleep(100);
iff.g_pClientState->ForceFullUpdate(); iff.g_pClientState->ForceFullUpdate();
Sleep(100);
opt.needupdate = 1; opt.needupdate = 1;
Sleep(100);
ProtoFeatures.SendClientHello(); ProtoFeatures.SendClientHello();
Sleep(100);
ProtoFeatures.SendMatchmakingClient2GCHello(); ProtoFeatures.SendMatchmakingClient2GCHello();
Sleep(100);
opt.loading = 0; opt.loading = 0;
} }
@ -324,6 +329,7 @@ DWORD WINAPI HackThread(HMODULE hModule)
loadcrit.close(); loadcrit.close();
} }
void* fn_getplmoney = (void*)FindPatternV2("client.dll", "55 8B EC 56 8B 75 08 83 FE 3F"); void* fn_getplmoney = (void*)FindPatternV2("client.dll", "55 8B EC 56 8B 75 08 83 FE 3F");
if (fn_getplmoney) if (fn_getplmoney)
oGetPlayerMoney = (pGetPlayerMoney)DetourFunction( oGetPlayerMoney = (pGetPlayerMoney)DetourFunction(
@ -332,11 +338,12 @@ DWORD WINAPI HackThread(HMODULE hModule)
while (!opt.unhook) while (!opt.unhook)
{ {
if (GetAsyncKeyState(VK_INSERT) & 1) if (GetAsyncKeyState(VK_INSERT) & 1)
{ {
opt.show = !opt.show; opt.show = !opt.show;
printfdbg("Show Menu: %s\n", opt.show ? "true" : "false"); #ifdef DEBUG
cout << "Show Menu: " << opt.show << endl;
#endif
if (!opt.show) if (!opt.show)
iff.g_pInputSystem->EnableInput(1); iff.g_pInputSystem->EnableInput(1);
else else