Add option to weatherID, ui refactor

This commit is contained in:
Grinch_ 2022-02-07 14:46:55 +06:00
parent 27e1db1316
commit 97db976bdf
4 changed files with 184 additions and 25 deletions

View File

@ -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"
}
}

View File

@ -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)))
{

View File

@ -261,13 +261,8 @@ void Teleport::ShowPage()
#ifdef GTASA
FetchRadarSpriteData();
#endif
ImGui::Spacing();
Ui::DrawJSON(m_tpData, TeleportToLocation,RemoveTeleportEntry);
ImGui::EndTabItem();
}
if (ImGui::BeginTabItem("Custom"))
if (ImGui::CollapsingHeader("Add new"))
{
ImGui::Spacing();
ImGui::InputTextWithHint("Location", "Groove Street", m_nLocationBuffer, IM_ARRAYSIZE(m_nInputBuffer));
@ -277,14 +272,18 @@ void Teleport::ShowPage()
{
m_tpData.m_pJson->m_Data["Custom"][m_nLocationBuffer] = ("0, " + std::string(m_nInputBuffer));
#ifdef GTASA
#ifdef GTASA
// Clear the Radar coordinates
m_tpData.m_pJson->m_Data.erase("Radar");
m_tpData.m_pJson->m_Data["Radar"] = {};
#endif
#endif
m_tpData.m_pJson->WriteToDisk();
}
}
ImGui::Spacing();
Ui::DrawJSON(m_tpData, TeleportToLocation,RemoveTeleportEntry);
ImGui::EndTabItem();
}
ImGui::EndTabBar();

View File

@ -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<float>("Armourbar posX", 0x866B78, -999, 94, 999);