![]() |
namespace Unload
{ void Execute(); } // namespace Unload static void Thread() { Sleep(100); delete d3dhook_ptr; delete wndproc_ptr; rakhook::destroy(); StringCompressor::RemoveReference(); ImGui_ImplDX9_Shutdown(); ImGui_ImplWin32_Shutdown(); // crash every time // ImGui::DestroyContext() FreeLibryarAndExitThread(g_hModule, 0); } void Unload::Execute() { __try { Gui::m_bOpen = false; CSettings::Visuals.Esp.Player.m_bEnabled = false; CSettings::Visuals.Esp.Player.m_bBox = false; CSettings::Visuals.Esp.Player.m_bSkeleton = false; CSettings::Visuals.Esp.Player.m_bLine = false; CSettings::Visuals.Esp.Vehicle.m_bEnabled = false; } __except (EXCEPTION_EXECUTE_HANDLER) {} CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Thread, 0, 0, 0); } void MainLoop() { if (CKey::IsPressed(VK_DELETE)) { Unload::Execute(); } // ... } this is my code, not the best and often crashs the game, not there is any hook left to be removed, I just use sampapi and pluginsdk |
| Время: 08:38 |