diff --git a/CheatMenu/Game.cpp b/CheatMenu/Game.cpp index d18e81c..23f9a6a 100644 --- a/CheatMenu/Game.cpp +++ b/CheatMenu/Game.cpp @@ -167,6 +167,8 @@ void Game::FreeCam() { CPlayerPed* player = FindPlayerPed(-1); Command(0, true); + m_Freecam::m_bHudState = CHud::m_Wants_To_Draw_Hud; + m_Freecam::m_bRadarState = CHud::bScriptDontDisplayRadar; CHud::bScriptDontDisplayRadar = true; CHud::m_Wants_To_Draw_Hud = false; CVector player_pos = player->GetPosition(); @@ -276,8 +278,8 @@ void Game::ClearFreecamStuff() { m_Freecam::m_bInitDone = false; Command(0, false); - CHud::bScriptDontDisplayRadar = false; - CHud::m_Wants_To_Draw_Hud = true; + CHud::bScriptDontDisplayRadar = m_Freecam::m_bRadarState; + CHud::m_Wants_To_Draw_Hud = m_Freecam::m_bHudState; CPad::GetPad(0)->DisablePlayerControls = false; Command(m_Freecam::m_nPed); diff --git a/CheatMenu/Game.h b/CheatMenu/Game.h index 32b0bcf..e1ff570 100644 --- a/CheatMenu/Game.h +++ b/CheatMenu/Game.h @@ -25,6 +25,8 @@ public: inline static int m_nPed = -1; inline static CVector m_fMouse; inline static CVector m_fTotalMouse; + inline static bool m_bHudState; + inline static bool m_bRadarState; }; struct m_HardMode { diff --git a/CheatMenu/Menu.cpp b/CheatMenu/Menu.cpp index 176f367..ded2aa5 100644 --- a/CheatMenu/Menu.cpp +++ b/CheatMenu/Menu.cpp @@ -84,8 +84,8 @@ void Menu::DrawOverlay() { if (m_Overlay::fPosX != NULL && m_Overlay::fPosY != NULL) { - config.SetValue("overlay.fPosX", m_Overlay::fPosX); - config.SetValue("overlay.fPosY", m_Overlay::fPosY); + config.SetValue("overlay.posx", m_Overlay::fPosX); + config.SetValue("overlay.posy", m_Overlay::fPosY); ImGui::SetNextWindowPos(ImVec2(m_Overlay::fPosX, m_Overlay::fPosY), ImGuiCond_Once); } }