Added save anywhere option

This commit is contained in:
Grinch_ 2021-07-27 01:11:19 +06:00
parent 90c4285f9f
commit b90d95fd75
2 changed files with 17 additions and 1 deletions

View File

@ -5,6 +5,7 @@
#include "Util.h"
#include "CIplStore.h"
static bool bSaveGameFlag = false;
// Thanks to aap
void Game::RealTimeClock()
@ -43,6 +44,14 @@ Game::Game()
m_RandomCheats::m_EnabledCheats[std::stoi(element.key())][1] = "true";
}
Events::drawMenuBackgroundEvent += []()
{
if (bSaveGameFlag)
{
FrontEndMenuManager.m_nCurrentMenuPage = MENUPAGE_GAME_SAVE;
bSaveGameFlag = false;
}
};
Events::processScriptsEvent += []
{
uint timer = CTimer::m_snTimeInMilliseconds;
@ -301,6 +310,13 @@ void Game::Draw()
CPlayerPed* pPlayer = FindPlayerPed();
int hplayer = CPools::GetPedRef(pPlayer);
if (ImGui::Button("Save game (might cause game bugs)",Ui::GetSize()))
{
FrontEndMenuManager.m_bActivateMenuNextFrame = true;
bSaveGameFlag = true;
}
ImGui::Spacing();
if (ImGui::BeginTabBar("Game", ImGuiTabBarFlags_NoTooltip + ImGuiTabBarFlags_FittingPolicyScroll))
{
if (ImGui::BeginTabItem("Checkboxes"))

View File

@ -2,5 +2,5 @@
#define MENU_NAME "Cheat Menu"
#define MENU_VERSION_NUMBER "2.8"
#define MENU_VERSION MENU_VERSION_NUMBER"-beta"
#define BUILD_NUMBER "20210717"
#define BUILD_NUMBER "20210727"
#define MENU_TITLE MENU_NAME " v" MENU_VERSION "(" BUILD_NUMBER ")"