From 8d2f6b4d3cad2d858cfedf7600e78fd169938f4e Mon Sep 17 00:00:00 2001 From: Grinch_ Date: Mon, 27 Sep 2021 17:10:41 +0600 Subject: [PATCH] Bug fixes with command window & more --- src/dllmain.cpp | 22 ++++++++-------------- src/menu.cpp | 2 +- src/menuinfo.h | 2 +- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/dllmain.cpp b/src/dllmain.cpp index 4b80d5c..36fac0a 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -78,25 +78,19 @@ BOOL WINAPI DllMain(HINSTANCE hDllHandle, DWORD nReason, LPVOID Reserved) if (nReason == DLL_PROCESS_ATTACH) { uint gameVersion = GetGameVersion(); + + if (gameVersion == BY_GAME(GAME_10US_HOODLUM, GAME_10EN)) + { + CreateThread(nullptr, NULL, (LPTHREAD_START_ROUTINE)&MenuThread, nullptr, NULL, nullptr); + } + else + { #ifdef GTASA - if (gameVersion == GAME_10US_HOODLUM) - { - CreateThread(nullptr, NULL, (LPTHREAD_START_ROUTINE)&MenuThread, nullptr, NULL, nullptr); - } - else - { MessageBox(HWND_DESKTOP, "Unknown game version. GTA SA v1.0 US is required.", "CheatMenu", MB_ICONERROR); - } #elif GTAVC - if (gameVersion == GAME_10EN) - { - CreateThread(nullptr, NULL, (LPTHREAD_START_ROUTINE)&MenuThread, nullptr, NULL, nullptr); - } - else - { MessageBox(HWND_DESKTOP, "Unknown game version. GTA VC v1.0 EN is required.", "CheatMenu", MB_ICONERROR); - } #endif + } } return TRUE; diff --git a/src/menu.cpp b/src/menu.cpp index cfe67fb..2cc9899 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -473,7 +473,7 @@ void Menu::Draw() { if (ImGui::BeginChild("CommandsChild")) { - ImGui::TextWrapped("Open or close command window using %s", commandWindow.GetNameString()); + ImGui::TextWrapped("Open or close command window using %s", commandWindow.GetNameString().c_str()); ImGui::Spacing(); if (ImGui::CollapsingHeader("Set health")) { diff --git a/src/menuinfo.h b/src/menuinfo.h index 686ebf8..e77b2de 100644 --- a/src/menuinfo.h +++ b/src/menuinfo.h @@ -2,5 +2,5 @@ #define MENU_NAME "Cheat Menu" #define MENU_VERSION_NUMBER "3.0" #define MENU_VERSION MENU_VERSION_NUMBER"-beta" -#define BUILD_NUMBER "20210923" +#define BUILD_NUMBER "20210927" #define MENU_TITLE MENU_NAME " v" MENU_VERSION "(" BUILD_NUMBER ")"