From 97db976bdfbeac0d2fae04c4f437448d6d5202a0 Mon Sep 17 00:00:00 2001 From: Grinch_ Date: Mon, 7 Feb 2022 14:46:55 +0600 Subject: [PATCH] Add option to weatherID, ui refactor --- resource/CheatMenuSA/json/particle.json | 149 ++++++++++++++++++++++++ src/game.cpp | 9 ++ src/teleport.cpp | 43 ++++--- src/visual.cpp | 8 +- 4 files changed, 184 insertions(+), 25 deletions(-) create mode 100644 resource/CheatMenuSA/json/particle.json diff --git a/resource/CheatMenuSA/json/particle.json b/resource/CheatMenuSA/json/particle.json new file mode 100644 index 0000000..3e4023e --- /dev/null +++ b/resource/CheatMenuSA/json/particle.json @@ -0,0 +1,149 @@ +{ + "Custom": {}, + "Main": { + "BlackSmoke": "Dummy", + "Cooler": "Dummy", + "Flame": "Dummy", + "Flash": "Dummy", + "Nitro": "Dummy", + "Nitrocenter": "Dummy", + "ParticleEmitter": "Dummy", + "Smoke": "Dummy", + "Spray": "Dummy", + "WS_factorysmoke": "Dummy", + "WhiteSmoke": "Dummy", + "bigdust": "Dummy", + "biglass": "Dummy", + "bigsplash": "Dummy", + "blood_cloud": "Dummy", + "blood_heli": "Dummy", + "blood_spatter": "Dummy", + "boat_prop": "Dummy", + "bubbles": "Dummy", + "camflash": "Dummy", + "carwashspray": "Dummy", + "cement": "Dummy", + "chunks": "Dummy", + "cigarette_smoke": "Dummy", + "circles": "Dummy", + "cloudfast": "Dummy", + "coke": "Dummy", + "coke_puff": "Dummy", + "coke_trail": "Dummy", + "debris": "Dummy", + "debris1": "Dummy", + "debris2": "Dummy", + "debris3": "Dummy", + "debris4": "Dummy", + "debris5": "Dummy", + "droplets": "Dummy", + "dust": "Dummy", + "evergreen": "Dummy", + "exhale": "Dummy", + "explosion": "Dummy", + "explosion_barrel": "Dummy", + "explosion_crate": "Dummy", + "explosion_door": "Dummy", + "explosion_fuel_car": "Dummy", + "explosion_large": "Dummy", + "explosion_medium": "Dummy", + "explosion_molotov": "Dummy", + "explosion_small": "Dummy", + "explosion_tiny": "Dummy", + "extinguisher": "Dummy", + "fag_smoke": "Dummy", + "fire": "Dummy", + "fire_bike": "Dummy", + "fire_car": "Dummy", + "fire_large": "Dummy", + "fire_med": "Dummy", + "flamethrower": "Dummy", + "flameyflames": "Dummy", + "flare": "Dummy", + "flash": "Dummy", + "flys": "Dummy", + "froosh": "Dummy", + "gasholding": "Dummy", + "gunflash": "Dummy", + "gunsmoke": "Dummy", + "heathaze": "Dummy", + "heli_dust": "Dummy", + "hydrant_gush": "Dummy", + "hydrant_splash": "Dummy", + "impact": "Dummy", + "insects": "Dummy", + "jetpack": "Dummy", + "jetthrust": "Dummy", + "lickyflames": "Dummy", + "lumpygreyshit": "Dummy", + "molotov_flame": "Dummy", + "newfirecar": "Dummy", + "newfirecarbig": "Dummy", + "nitro": "Dummy", + "normal": "Dummy", + "overheat_car": "Dummy", + "overheat_car_electric": "Dummy", + "palm": "Dummy", + "petrolcan": "Dummy", + "planeclouds": "Dummy", + "propellor": "Dummy", + "prt_blood": "Dummy", + "prt_boatsplash": "Dummy", + "prt_bubble": "Dummy", + "prt_cardebris": "Dummy", + "prt_collisionsmoke": "Dummy", + "prt_glass": "Dummy", + "prt_gunshell": "Dummy", + "prt_sand": "Dummy", + "prt_sand2": "Dummy", + "prt_smokeII_3_expand": "Dummy", + "prt_smoke_huge": "Dummy", + "prt_spark": "Dummy", + "prt_spark_2": "Dummy", + "prt_splash": "Dummy", + "prt_wake": "Dummy", + "prt_watersplash": "Dummy", + "prt_wheeldirt": "Dummy", + "puke": "Dummy", + "redsmoke": "Dummy", + "riot_smoke": "Dummy", + "sand": "Dummy", + "shootlight": "Dummy", + "smoke": "Dummy", + "smoke1": "Dummy", + "smoke30lit": "Dummy", + "smoke30m": "Dummy", + "smoke50lit": "Dummy", + "smoke_flare": "Dummy", + "smokefaster": "Dummy", + "smokeydef": "Dummy", + "smoother": "Dummy", + "sparkles": "Dummy", + "sparks": "Dummy", + "spew": "Dummy", + "splash": "Dummy", + "sploosh": "Dummy", + "splosion": "Dummy", + "spray": "Dummy", + "spraycan": "Dummy", + "tank_fire": "Dummy", + "teargas": "Dummy", + "teargasAD": "Dummy", + "tree_hit_fir": "Dummy", + "tree_hit_palm": "Dummy", + "vent": "Dummy", + "vent2": "Dummy", + "wallbust": "Dummy", + "water": "Dummy", + "water_fnt_tme": "Dummy", + "water_fountain": "Dummy", + "water_hydrant": "Dummy", + "water_ripples": "Dummy", + "water_speed": "Dummy", + "water_splash": "Dummy", + "water_splash_big": "Dummy", + "water_splsh_sml": "Dummy", + "water_swim": "Dummy", + "waterfall_end": "Dummy" + } +} diff --git a/src/game.cpp b/src/game.cpp index 2040851..1e86e06 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -682,6 +682,15 @@ Lowers armour, health, stamina etc.")) { Call<0x438F50>(); } + + ImGui::Spacing(); + static int weatherID = 0; + if (ImGui::InputInt("Weather ID", &weatherID)) + { + CWeather::OldWeatherType = weatherID; + CWeather::NewWeatherType = weatherID; + } + Ui::ShowTooltip("Sets weather by IDs (0-255). Don't touch unless you know what you're doing!"); #else if (ImGui::Button("Sunny", Ui::GetSize(3))) { diff --git a/src/teleport.cpp b/src/teleport.cpp index 76b5696..061a3ab 100644 --- a/src/teleport.cpp +++ b/src/teleport.cpp @@ -260,33 +260,32 @@ void Teleport::ShowPage() { #ifdef GTASA FetchRadarSpriteData(); -#endif +#endif + ImGui::Spacing(); + if (ImGui::CollapsingHeader("Add new")) + { + ImGui::Spacing(); + ImGui::InputTextWithHint("Location", "Groove Street", m_nLocationBuffer, IM_ARRAYSIZE(m_nInputBuffer)); + ImGui::InputTextWithHint("Coordinates", "x, y, z", m_nInputBuffer, IM_ARRAYSIZE(m_nInputBuffer)); + ImGui::Spacing(); + if (ImGui::Button("Add location", Ui::GetSize())) + { + m_tpData.m_pJson->m_Data["Custom"][m_nLocationBuffer] = ("0, " + std::string(m_nInputBuffer)); + + #ifdef GTASA + // Clear the Radar coordinates + m_tpData.m_pJson->m_Data.erase("Radar"); + m_tpData.m_pJson->m_Data["Radar"] = {}; + #endif + + m_tpData.m_pJson->WriteToDisk(); + } + } ImGui::Spacing(); Ui::DrawJSON(m_tpData, TeleportToLocation,RemoveTeleportEntry); ImGui::EndTabItem(); } - - if (ImGui::BeginTabItem("Custom")) - { - ImGui::Spacing(); - ImGui::InputTextWithHint("Location", "Groove Street", m_nLocationBuffer, IM_ARRAYSIZE(m_nInputBuffer)); - ImGui::InputTextWithHint("Coordinates", "x, y, z", m_nInputBuffer, IM_ARRAYSIZE(m_nInputBuffer)); - ImGui::Spacing(); - if (ImGui::Button("Add location", Ui::GetSize())) - { - m_tpData.m_pJson->m_Data["Custom"][m_nLocationBuffer] = ("0, " + std::string(m_nInputBuffer)); - -#ifdef GTASA - // Clear the Radar coordinates - m_tpData.m_pJson->m_Data.erase("Radar"); - m_tpData.m_pJson->m_Data["Radar"] = {}; -#endif - - m_tpData.m_pJson->WriteToDisk(); - } - ImGui::EndTabItem(); - } ImGui::EndTabBar(); } } diff --git a/src/visual.cpp b/src/visual.cpp index 92fa38e..79d19ef 100644 --- a/src/visual.cpp +++ b/src/visual.cpp @@ -437,7 +437,7 @@ void Visual::ShowPage() } Ui::CheckboxAddress("Show hud", 0xBA6769); - Ui::CheckboxAddressEx("Unfog map", 0xBA372C, 0x50, 0x0); + Ui::CheckboxAddressEx("Unfog map", 0xBA372C, 0x50, 0x0, "Removes fog from Main Menu Map"); #elif GTAVC Ui::CheckboxAddress("Hide radar", 0xA10AB6); Ui::CheckboxWithHint("Lock weather", &m_bLockWeather); @@ -549,8 +549,10 @@ void Visual::ShowPage() if (ImGui::BeginChild("VisualsChild")) { #ifdef GTASA - ImGui::TextWrapped( - "These options won't work if you got any mods that drastically change the game hud. i.e. Mobile Hud, GTA 5 Hud, VHud etc."); + ImGui::Spacing(); + ImGui::SameLine(); + ImGui::TextWrapped("Incompatible mods"); + Ui::ShowTooltip("1. vHud\n2. GTA 5 Hud\n3. MobileHud\n\nAnd others that change HUD drastically"); ImGui::Spacing(); Ui::ColorPickerAddress("Armourbar color", *(int*)0x5890FC, ImVec4(225, 225, 225, 255)); Ui::EditAddress("Armourbar posX", 0x866B78, -999, 94, 999);