From 2488d190d76feaada2d0fabbb43e41a63b816e2c Mon Sep 17 00:00:00 2001 From: Grinch_ Date: Tue, 17 Aug 2021 11:46:41 +0600 Subject: [PATCH] Add Game menu and more stuff --- resource/VC/CheatMenu/json/mission.json | 162 +++++++++++++++++++++++ src/CheatMenu.h | 7 +- src/Game.cpp | 163 +++++++++++++++++------- src/Game.h | 24 ++-- src/MenuInfo.h | 2 +- src/Ped.cpp | 1 + src/Vehicle.cpp | 20 ++- src/Weapon.cpp | 2 +- src/pch.h | 10 +- tools/premake5.lua | 2 + 10 files changed, 321 insertions(+), 72 deletions(-) create mode 100644 resource/VC/CheatMenu/json/mission.json diff --git a/resource/VC/CheatMenu/json/mission.json b/resource/VC/CheatMenu/json/mission.json new file mode 100644 index 0000000..0bcffe9 --- /dev/null +++ b/resource/VC/CheatMenu/json/mission.json @@ -0,0 +1,162 @@ +{ + "Arrival to Vice City" : + { + "Initial" : "0 ", + "Intro" : "1 ", + "An Old Friend" : "2 " + }, + "Ken Rosenberg" : + { + "The Party" : "3 ", + "Back Alley Brawl" : "4 ", + "Jury Fury" : "5 ", + "Riot" : "6 " + }, + "Mr. Black" : + { + "Road Kill" : "67", + "Waste the Wife" : "68", + "Autocide" : "69", + "Check Out at the Check In" : "70", + "Loose Ends" : "71" + }, + "Avery Carrington" : + { + "Four Iron" : "18", + "Demolition Man" : "19", + "Two Bit Hit" : "20" + }, + "Juan Cortez" : + { + "Treacherous Swine" : "7 ", + "Mall Shootout" : "8 ", + "Guardian Angels" : "9 ", + "Sir, Yes Sir!" : "10", + "All Hands On Deck!" : "11" + }, + "Ricardo Diaz" : + { + "The Chase" : "12", + "Phnom Penh '86" : "13", + "The Fastest Boat" : "14", + "Supply & Demand" : "15", + "Rub Out" : "16" + }, + "Umberto Robina" : + { + "Stunt Boat Challenge" : "56", + "Cannon Fodder" : "57", + "Naval Engagement" : "58", + "Trojan Voodoo" : "59" + }, + "Auntie Poulet" : + { + "Juju Scramble" : "60", + "Bombs Away!" : "61", + "Dirty Lickin's" : "62" + }, + "Kent Paul" : + { + "Death Row" : "17" + }, + "Tommy Vercetti" : + { + "Shakedown" : "31", + "Bar Brawl" : "32", + "Cop Land" : "33", + "Cap the Collector" : "51", + "Keep your Friends Close..." : "52" + }, + "Love Fist" : + { + "Love Juice" : "63", + "Psycho Killer" : "64" + }, + "Mitch Baker" : + { + "Alloy Wheels of Steel" : "53", + "Messing with the Man" : "54", + "Hog Tied" : "55", + "Publicity Tour" : "65" + }, + "Malibu Club" : + { + "No Escape?" : "21", + "The Shootist" : "22", + "The Driver" : "23", + "The Job" : "24" + }, + "InterGlobal Studios" : + { + "Recruitment Drive" : "27", + "Dildo Dodo" : "28", + "Martha's Mug Shot" : "29", + "G-spotlight" : "30" + }, + "Kaufman Cabs" : + { + "V.I.P." : "72", + "Friendly Rivalry" : "73", + "Cabmaggedon" : "74" + }, + "Print Works" : + { + "Spilling the Beans" : "34", + "Hit the Courier" : "35" + }, + "Misc" : + { + "Cherry Popper Distribution" : "83", + "Sunshine Autos" : "37", + "Checkpoint Charlie" : "96", + "Printworks Buy" : "36", + "Interglobal Films Buy" : "38", + "Cherry Popper Icecreams Buy" : "39", + "Kaufman Cabs Buy" : "40", + "Malibu Club Buy" : "41", + "The Boatyard Buy" : "42", + "Pole Position Club Buy" : "43", + "El Swanko Casa Buy" : "44", + "Links View Apartment Buy" : "45", + "Hyman Condo Buy" : "46", + "Ocean Heighs Aprt. Buy" : "47", + "1102 Washington Street Buy" : "48", + "Vice Point Buy" : "49", + "Skumole Shack Buy" : "50", + "Weapon Range" : "66", + "TAXI DRIVER" : "75", + "PARAMEDIC" : "76", + "FIREFIGHTER" : "77", + "VIGILANTE" : "78", + "HOTRING" : "79", + "BLOODRING" : "80", + "DIRTRING" : "81", + "PIZZA BOY" : "92" + }, + "Phil Cassidy" : + { + "Gun Runner" : "25", + "Boomshine Saigon" : "26" + }, + "Offroad races" : + { + "Trial by Dirt" : "88", + "Test Track" : "89", + "PCJ Playground" : "90", + "Cone Crazy" : "91" + }, + "RC Missions" : + { + "RC Raider Pickup" : "93", + "RC Bandit Race" : "94", + "RC Baron Race" : "95" + }, + "Sparrow missions" : + { + "Sunshine Autos Races" : "82", + "Downtown Chopper Checkpoint" : "84", + "Ocean Beach Chopper Checkpoint" : "85", + "Vice Point Chopper Checkpoint" : "86", + "Little Haiti Chopper Checkpoint" : "87" + } +} \ No newline at end of file diff --git a/src/CheatMenu.h b/src/CheatMenu.h index 1d641c9..0f6c798 100644 --- a/src/CheatMenu.h +++ b/src/CheatMenu.h @@ -17,13 +17,13 @@ #include "Ped.h" #include "Vehicle.h" #include "Weapon.h" +#include "Game.h" #ifdef GTASA -#include "Game.h" #include "Visual.h" class CheatMenu : Hook, Animation, Game, Menu, Ped, Player, Teleport, Vehicle, Visual, Weapon #elif GTAVC -class CheatMenu : Hook, Animation, Menu, Player, Ped, Teleport, Vehicle, Weapon +class CheatMenu : Hook, Animation, Game, Menu, Player, Ped, Teleport, Vehicle, Weapon #endif { @@ -39,7 +39,8 @@ private: inline static CallbackTable header { {"Teleport", &Teleport::Draw}, {"Player", &Player::Draw}, {"Ped", &Ped::Draw}, - {"Vehicle", &Vehicle::Draw}, {"Weapon", &Weapon::Draw}, {"Menu", &Menu::Draw} + {"Dummy", nullptr}, {"Vehicle", &Vehicle::Draw}, {"Weapon", &Weapon::Draw}, + {"Game", &Game::Draw}, {"Menu", &Menu::Draw} }; #endif diff --git a/src/Game.cpp b/src/Game.cpp index 7bb8172..ee6fb8a 100644 --- a/src/Game.cpp +++ b/src/Game.cpp @@ -3,24 +3,31 @@ #include "Game.h" #include "Ui.h" #include "Util.h" +#ifdef GTASA #include "CIplStore.h" +#endif static bool bSaveGameFlag = false; // Thanks to aap void Game::RealTimeClock() { - static int lastday; time_t tmp = time(nullptr); struct tm* now = localtime(&tmp); +#ifdef GTASA + static int lastday; if (now->tm_yday != lastday) + { CStats::SetStatValue(0x86, CStats::GetStatValue(0x86) + 1.0f); + } lastday = now->tm_yday; CClock::ms_nGameClockMonth = now->tm_mon + 1; CClock::ms_nGameClockDays = now->tm_mday; CClock::CurrentDay = now->tm_wday + 1; +#endif + CClock::ms_nGameClockHours = now->tm_hour; CClock::ms_nGameClockMinutes = now->tm_min; CClock::ms_nGameClockSeconds = now->tm_sec; @@ -28,6 +35,7 @@ void Game::RealTimeClock() Game::Game() { +#ifdef GTASA // Generate enabled cheats vector for (auto element : m_RandomCheats::m_Json.m_Data.items()) { @@ -48,12 +56,15 @@ Game::Game() bSaveGameFlag = false; } }; +#endif + Events::processScriptsEvent += [] { uint timer = CTimer::m_snTimeInMilliseconds; CPlayerPed* pPlayer = FindPlayerPed(); int hplayer = CPools::GetPedRef(pPlayer); +#ifdef GTASA if (m_bScreenShot) { if (Ui::HotKeyPressed(Menu::m_HotKeys::quickSceenShot)) @@ -106,6 +117,25 @@ Game::Game() } } + if (Ui::HotKeyPressed(Menu::m_HotKeys::freeCam)) + { + if (m_Freecam::m_bEnabled) + { + m_Freecam::m_bEnabled = false; + ClearFreecamStuff(); + } + else + { + m_Freecam::m_bEnabled = true; + } + } + + if (m_Freecam::m_bEnabled) + { + FreeCam(); + } +#endif + // improve this later if (m_bSyncTime && timer - m_nSyncTimer > 50) { @@ -118,6 +148,7 @@ Game::Game() m_nSyncTimer = timer; } +#ifdef GTASA if (m_RandomCheats::m_bEnabled && (timer - m_RandomCheats::m_nTimer) > (static_cast(m_RandomCheats::m_nInterval) * 1000)) { @@ -137,24 +168,7 @@ Game::Game() } } } - - if (Ui::HotKeyPressed(Menu::m_HotKeys::freeCam)) - { - if (m_Freecam::m_bEnabled) - { - m_Freecam::m_bEnabled = false; - ClearFreecamStuff(); - } - else - { - m_Freecam::m_bEnabled = true; - } - } - - if (m_Freecam::m_bEnabled) - { - FreeCam(); - } +#endif }; } @@ -166,7 +180,7 @@ void SetPlayerMission(std::string& rootkey, std::string& name, std::string& id) Command<0x09E8>(hplayer, &interior); - if (Util::IsOnMission() && interior == 0) + if (BY_GAME(Util::IsOnMission(), true) && interior == 0) { player->SetWantedLevel(0); Command(std::stoi(id)); @@ -174,6 +188,7 @@ void SetPlayerMission(std::string& rootkey, std::string& name, std::string& id) else SetHelpMessage("Can't start mission now", false, false, false); } +#ifdef GTASA void Game::FreeCam() { int deltaSpeed = m_Freecam::m_fSpeed * (CTimer::m_snTimeInMillisecondsNonClipped - @@ -183,10 +198,12 @@ void Game::FreeCam() { CPlayerPed* player = FindPlayerPed(-1); Command(0, true); + m_Freecam::m_bHudState = patch::Get(0xBA6769); // hud m_Freecam::m_bRadarState = patch::Get(0xBA676C); // radar patch::Set(0xBA6769, 0); // hud patch::Set(0xBA676C, 2); // radar + CVector player_pos = player->GetPosition(); CPad::GetPad(0)->DisablePlayerControls = true; @@ -310,7 +327,7 @@ void Game::ClearFreecamStuff() { m_Freecam::m_bInitDone = false; Command(0, false); - patch::Set(0xBA6769, m_Freecam::m_bHudState); // hud + patch::Set(BY_GAME(0xBA6769, 0x86963A), m_Freecam::m_bHudState); // hud patch::Set(0xBA676C, m_Freecam::m_bRadarState); // radar CPad::GetPad(0)->DisablePlayerControls = false; @@ -319,6 +336,7 @@ void Game::ClearFreecamStuff() Command(false); Command(); } +#endif void Game::Draw() { @@ -326,12 +344,14 @@ void Game::Draw() CPlayerPed* pPlayer = FindPlayerPed(); int hplayer = CPools::GetPedRef(pPlayer); +#ifdef GTASA if (ImGui::Button("Save game (might cause game bugs)", Ui::GetSize())) { FrontEndMenuManager.m_bActivateMenuNextFrame = true; bSaveGameFlag = true; } ImGui::Spacing(); +#endif if (ImGui::BeginTabBar("Game", ImGuiTabBarFlags_NoTooltip + ImGuiTabBarFlags_FittingPolicyScroll)) { @@ -343,31 +363,41 @@ void Game::Draw() { if (m_bDisableCheats) { +#ifdef GTASA patch::Set(0x4384D0, 0xE9, false); patch::SetInt(0x4384D1, 0xD0, false); patch::Nop(0x4384D5, 4, false); +#elif GTAVC + patch::Nop(0x602BD8, 5); + patch::Nop(0x602BE7, 5); +#endif } else { +#ifdef GTASA patch::Set(0x4384D0, 0x83, false); - patch::SetInt(0x4384D1, -0x7DF0F908, false); + patch::SetInt(0x4384D1, -0x7DF0F908, false); // correct? patch::SetInt(0x4384D5, 0xCC, false); +#elif GTAVC + patch::SetRaw(0x602BD8, (char*)"\x88\xD8\x89\xF1\x50", 5); + patch::SetRaw(0x602BE7, (char*)"\xE8\x34\x91\xEA\xFF", 5); +#endif } } if (ImGui::Checkbox("Disable F1 & F3 replay", &m_bDisableReplay)) { if (m_bDisableReplay) { - patch::SetInt(0x460500, 0xC3, false); + patch::SetChar(BY_GAME(0x460500, 0x624EC0), 0xC3); } else { - patch::SetInt(0x460500, 0xBD844BB, false); + patch::SetChar(BY_GAME(0x460500, 0x624EC0), 0x80); } } - Ui::CheckboxAddress("Faster clock", 0x96913B); - + Ui::CheckboxAddress("Faster clock", BY_GAME(0x96913B, 0xA10B87)); +#ifdef GTASA if (Ui::CheckboxWithHint("Forbidden area wl", &m_bForbiddenArea, "Wanted levels that appears outside \ of LS without completing missions")) { @@ -380,28 +410,33 @@ of LS without completing missions")) patch::Set(0x441770, 0xC3, false); } } - +#endif Ui::CheckboxAddress("Free pay n spray", 0x96C009); +#ifdef GTAVC + ImGui::NextColumn(); +#endif + Ui::CheckboxAddress("Freeze game", 0xA10B48); if (ImGui::Checkbox("Freeze game time", &m_bFreezeTime)) { if (m_bFreezeTime) { - patch::SetRaw(0x52CF10, (char*)"\xEB\xEF", 2); + patch::SetRaw(BY_GAME(0x52CF10, 0x487010), (char*)"\xEB\xEF", 2); } else { - patch::SetRaw(0x52CF10, (char*)"\x56\x8B", 2); + patch::SetRaw(BY_GAME(0x52CF10, 0x487010), (char*)BY_GAME("\x56\x8B","\x6A\x01"), 2); } } +#ifdef GTASA ImGui::NextColumn(); - +#endif if (ImGui::Checkbox("Freeze misson timer", &m_bMissionTimer)) { Command(m_bMissionTimer); } - +#ifdef GTASA if (Ui::CheckboxWithHint("Hard mode", &m_HardMode::m_bEnabled, "Makes the game more challanging to play. \n\ Lowers armour, health, stamina etc.")) { @@ -424,7 +459,6 @@ Lowers armour, health, stamina etc.")) CWeaponInfo::LoadWeaponData(); } } - if (Ui::CheckboxWithHint("Keep stuff", &m_bKeepStuff, "Keep stuff after arrest/death")) { Command(m_bKeepStuff); @@ -442,12 +476,17 @@ Lowers armour, health, stamina etc.")) m_nSolidWaterObj = 0; } } +#endif if (ImGui::Checkbox("Sync system time", &m_bSyncTime)) { if (m_bSyncTime) - patch::RedirectCall(0x53BFBD, &RealTimeClock); + { + patch::RedirectCall(BY_GAME(0x53BFBD, 0x4A44F7), &RealTimeClock); + } else - patch::RedirectCall(0x53BFBD, &CClock::Update); + { + patch::RedirectCall(BY_GAME(0x53BFBD, 0x4A44F7), &CClock::Update); + } } ImGui::Columns(1); @@ -455,6 +494,7 @@ Lowers armour, health, stamina etc.")) } if (ImGui::BeginTabItem("Menus")) { +#ifdef GTASA if (ImGui::CollapsingHeader("Current day")) { int day = CClock::CurrentDay - 1; @@ -466,15 +506,19 @@ Lowers armour, health, stamina etc.")) ImGui::Spacing(); ImGui::Separator(); } - Ui::EditAddress("Days passed", 0xB79038, 0, 9999); - Ui::EditReference("FPS limit", RsGlobal.frameLimit, 1, 30, 60); +#endif + Ui::EditAddress("Days passed", BY_GAME(0xB79038,0x97F1F4), 0, 9999); + Ui::EditReference("FPS limit", BY_GAME(RsGlobal.frameLimit, RsGlobal.maxFPS), 1, 30, 60); +#ifdef GTASA if (ImGui::CollapsingHeader("Free cam")) { if (Ui::CheckboxWithHint("Enable", &m_Freecam::m_bEnabled, "Forward: I\tBackward: K\ \nLeft: J\t\t Right: L\n\nSlower: RCtrl\tFaster: RShift\n\nZoom: Mouse wheel")) { if (!m_Freecam::m_bEnabled) + { ClearFreecamStuff(); + } } ImGui::Spacing(); @@ -485,8 +529,9 @@ Lowers armour, health, stamina etc.")) ImGui::Spacing(); ImGui::Separator(); } +#endif Ui::EditReference("Game speed", CTimer::ms_fTimeScale, 1, 1, 10); - Ui::EditFloat("Gravity", 0x863984, -1.0f, 0.008f, 1.0f, 1.0f, 0.01f); + Ui::EditFloat("Gravity", BY_GAME(0x863984,0x68F5F0), -1.0f, 0.008f, 1.0f, 1.0f, 0.01f); if (ImGui::CollapsingHeader("Set time")) { @@ -510,49 +555,69 @@ Lowers armour, health, stamina etc.")) ImGui::Spacing(); ImGui::Separator(); } - +#ifdef GTASA static std::vector themes{ {"Beach", 0x969159}, {"Country", 0x96917D}, {"Fun house", 0x969176}, {"Ninja", 0x96915C} }; Ui::EditRadioButtonAddress("Themes", themes); - +#endif if (ImGui::CollapsingHeader("Weather")) { - using func = void(void); +#ifdef GTASA if (ImGui::Button("Foggy", Ui::GetSize(3))) { - ((func*)0x438F80)(); + Call<0x438F80>(); } ImGui::SameLine(); if (ImGui::Button("Overcast", Ui::GetSize(3))) { - ((func*)0x438F60)(); + Call<0x438F60>(); } ImGui::SameLine(); if (ImGui::Button("Rainy", Ui::GetSize(3))) { - ((func*)0x438F70)(); + Call<0x438F70>(); } if (ImGui::Button("Sandstorm", Ui::GetSize(3))) { - ((func*)0x439590)(); + Call<0x439590>(); } ImGui::SameLine(); if (ImGui::Button("Thunderstorm", Ui::GetSize(3))) { - ((func*)0x439570)(); + Call<0x439570>(); } ImGui::SameLine(); if (ImGui::Button("Very sunny", Ui::GetSize(3))) { - ((func*)0x438F50)(); + Call<0x438F50>(); + } +#elif GTAVC + if (ImGui::Button("Sunny", Ui::GetSize(3))) + { + CWeather::ForceWeatherNow(0); + } + ImGui::SameLine(); + if (ImGui::Button("Cloudy", Ui::GetSize(3))) + { + CWeather::ForceWeatherNow(1); + } + ImGui::SameLine(); + if (ImGui::Button("Rainy", Ui::GetSize(3))) + { + CWeather::ForceWeatherNow(2); } + if (ImGui::Button("Foggy", Ui::GetSize(3))) + { + CWeather::ForceWeatherNow(3); + } +#endif ImGui::Spacing(); ImGui::Separator(); } @@ -578,8 +643,10 @@ It's recommanded not to save after using the mission loader. Use it at your own { if (ImGui::Button("Fail current mission", ImVec2(Ui::GetSize()))) { - if (!CCutsceneMgr::ms_running) + if (!Util::IsOnCutscene()) + { Command(); + } } ImGui::Spacing(); @@ -588,6 +655,7 @@ It's recommanded not to save after using the mission loader. Use it at your own } ImGui::EndTabItem(); } +#ifdef GTASA if (ImGui::BeginTabItem("Stats")) { // similar to Ui::DrawJSON() @@ -649,6 +717,7 @@ It's recommanded not to save after using the mission loader. Use it at your own } ImGui::EndTabItem(); } +#endif ImGui::EndTabBar(); } } diff --git a/src/Game.h b/src/Game.h index f403f7b..5deef0e 100644 --- a/src/Game.h +++ b/src/Game.h @@ -4,10 +4,20 @@ class Game { public: inline static ResourceStore m_MissionData{ "mission", eResourceType::TYPE_TEXT }; + +#ifdef GTASA + inline static bool m_bForbiddenArea = true; + inline static bool m_bSolidWater; + inline static bool m_bScreenShot; + inline static uint m_nSolidWaterObj; + inline static bool m_bKeepStuff; + inline static ResourceStore m_StatData{ "stat", eResourceType::TYPE_TEXT }; + inline static std::vector m_DayNames = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; + struct m_RandomCheats { inline static bool m_bEnabled; @@ -37,24 +47,22 @@ public: inline static float m_fBacArmour = 0.0f; inline static float m_fBacStamina = 0.0f; }; + +#endif inline static bool m_bDisableCheats; inline static bool m_bDisableReplay; - inline static bool m_bForbiddenArea = true; inline static bool m_bMissionTimer; inline static bool m_bFreezeTime; - inline static bool m_bKeepStuff; - inline static bool m_bSolidWater; - inline static bool m_bScreenShot; inline static bool m_bSyncTime; inline static uint m_nSyncTimer; - inline static uint m_nSolidWaterObj; inline static bool m_bMissionLoaderWarningShown; - inline static ResourceStore m_StatData{ "stat", eResourceType::TYPE_TEXT }; - Game(); static void Draw(); + static void RealTimeClock(); + +#ifdef GTASA static void FreeCam(); static void ClearFreecamStuff(); - static void RealTimeClock(); +#endif }; diff --git a/src/MenuInfo.h b/src/MenuInfo.h index fa967bd..882cf15 100644 --- a/src/MenuInfo.h +++ b/src/MenuInfo.h @@ -2,5 +2,5 @@ #define MENU_NAME "Cheat Menu" #define MENU_VERSION_NUMBER "2.9" #define MENU_VERSION MENU_VERSION_NUMBER"-beta" -#define BUILD_NUMBER "20210813" +#define BUILD_NUMBER "20210815" #define MENU_TITLE MENU_NAME " v" MENU_VERSION "(" BUILD_NUMBER ")" diff --git a/src/Ped.cpp b/src/Ped.cpp index 082544c..33a193b 100644 --- a/src/Ped.cpp +++ b/src/Ped.cpp @@ -137,6 +137,7 @@ void Ped::Draw() Ui::CheckboxAddress("Peds riot", 0x969175); Ui::CheckboxAddress("Slut magnet", 0x96915D); #elif GTAVC + Ui::CheckboxAddress("No prostitutes", 0xA10B99); Ui::CheckboxAddress("Slut magnet", 0xA10B5F); ImGui::NextColumn(); Ui::CheckboxAddress("Weapons for all", 0xA10AB3); diff --git a/src/Vehicle.cpp b/src/Vehicle.cpp index f73ad62..a3fdf13 100644 --- a/src/Vehicle.cpp +++ b/src/Vehicle.cpp @@ -716,8 +716,8 @@ void Vehicle::Draw() ImGui::Spacing(); ImGui::BeginChild("CheckboxesChild"); ImGui::Columns(2, 0, false); + Ui::CheckboxAddress("Aggressive drivers", BY_GAME(0x96914F,0xA10B47)); #ifdef GTASA - Ui::CheckboxAddress("Aggressive drivers", 0x96914F); Ui::CheckboxAddress("Aim while driving", 0x969179); Ui::CheckboxAddress("All cars have nitro", 0x969165); #endif @@ -761,6 +761,7 @@ void Vehicle::Draw() Ui::CheckboxAddress("Float away when hit", 0x969166); #endif Ui::CheckboxAddress("Green traffic lights", BY_GAME(0x96914E,0xA10ADC)); + #ifdef GTASA Ui::CheckboxAddress("Perfect handling", 0x96914C); Ui::CheckboxAddress("Tank mode", 0x969164); @@ -967,21 +968,26 @@ void Vehicle::Draw() ImGui::Spacing(); ImGui::Separator(); } -#ifdef GTASA + if (ImGui::CollapsingHeader("Traffic options")) { - static std::vector color{ {"Black", 0x969151}, {"Pink", 0x969150} }; + + static std::vector color + { + {"Black", BY_GAME(0x969151, 0xA10B82)}, + {"Pink", BY_GAME(0x969150, 0xA10B26)} + }; + Ui::RadioButtonAddress("Color", color); + ImGui::Spacing(); +#ifdef GTASA static std::vector type{ {"Cheap", 0x96915E}, {"Country", 0x96917B}, {"Fast", 0x96915F} }; - - Ui::RadioButtonAddress("Color", color); - ImGui::Spacing(); Ui::RadioButtonAddress("Type", type); +#endif ImGui::Spacing(); ImGui::Separator(); } -#endif if (pPlayer && pPlayer->m_pVehicle) { CVehicle* pVeh = pPlayer->m_pVehicle; diff --git a/src/Weapon.cpp b/src/Weapon.cpp index 3a92759..9c8283a 100644 --- a/src/Weapon.cpp +++ b/src/Weapon.cpp @@ -318,7 +318,7 @@ void Weapon::Draw() m_nAmmoCount = (m_nAmmoCount > 99999) ? 99999 : m_nAmmoCount; } #ifdef GTASA - Ui::DrawImages(m_WesaponData, GiveWeaponToPlayer, nullptr, + Ui::DrawImages(m_WeaponData, GiveWeaponToPlayer, nullptr, [](std::string str) { return m_WeaponData.m_pJson->m_Data[str].get(); }, [](std::string str) { return str != "0"; /*Unarmed*/ } ); diff --git a/src/pch.h b/src/pch.h index 0361f9d..7febd8d 100644 --- a/src/pch.h +++ b/src/pch.h @@ -50,9 +50,9 @@ struct HotKeyData // Common defines static void SetHelpMessage(const char *message, bool b1, bool b2, bool b3) { - #if GTAVC - CHud::SetHelpMessage(message, b1, b2); - #elif GTASA - CHud::SetHelpMessage(message, b1, b2, b3); - #endif +#if GTAVC + CHud::SetHelpMessage(message, b1, b2); +#elif GTASA + CHud::SetHelpMessage(message, b1, b2, b3); +#endif } \ No newline at end of file diff --git a/tools/premake5.lua b/tools/premake5.lua index 789553d..b9fe95e 100644 --- a/tools/premake5.lua +++ b/tools/premake5.lua @@ -81,6 +81,8 @@ project "CheatMenuVC" "../src/Menu.cpp", "../src/Weapon.h", "../src/Weapon.cpp", + "../src/Game.h", + "../src/Game.cpp", "../src/ResourceStore.h", "../src/ResourceStore.cpp" }