Move local time and weather to world submenu, add force thunder (#522)
This commit is contained in:
parent
839854a16b
commit
0188477573
@ -25,6 +25,7 @@ namespace big
|
||||
|
||||
WORLD,
|
||||
SPAWN_PED,
|
||||
TIME_AND_WEATHER,
|
||||
|
||||
NETWORK,
|
||||
SESSION,
|
||||
@ -74,6 +75,7 @@ namespace big
|
||||
}}},
|
||||
{ tabs::WORLD, { "World", nullptr, {
|
||||
{ tabs::SPAWN_PED, { "Spawn Ped", view::spawn_ped }},
|
||||
{ tabs::TIME_AND_WEATHER, { "Time And Weather", view::time_and_weather }},
|
||||
}}},
|
||||
{tabs::NETWORK, { "Network", nullptr, {
|
||||
{ tabs::SPOOFING, { "Spoofing", view::spoofing }},
|
||||
|
@ -4,6 +4,16 @@
|
||||
|
||||
namespace big::globals
|
||||
{
|
||||
namespace size
|
||||
{
|
||||
constexpr int globalplayer_bd = 453;
|
||||
constexpr int gpbd_fm_3 = 599;
|
||||
constexpr int gpbd_fm_1 = 888;
|
||||
}
|
||||
|
||||
static inline script_global gpbd_fm_3(1892703);
|
||||
static inline script_global gsbd_fm_events(1920255);
|
||||
|
||||
inline void clear_wanted_player(Player target)
|
||||
{
|
||||
constexpr size_t arg_count = 3;
|
||||
|
@ -3,6 +3,8 @@
|
||||
#include "script_global.hpp"
|
||||
#include "script.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "util/misc.hpp"
|
||||
#include "util/globals.hpp"
|
||||
#include "gta/joaat.hpp"
|
||||
#include "rage/rlSessionByGamerTaskResult.hpp"
|
||||
#include "pointers.hpp"
|
||||
@ -37,6 +39,22 @@ namespace big::session
|
||||
*script_global(262145).at(4723).as<bool*>() = g->session.local_weather == 13;
|
||||
}
|
||||
|
||||
inline void set_fm_event_index(int index)
|
||||
{
|
||||
int idx = index / 32;
|
||||
int bit = index % 32;
|
||||
misc::set_bit(globals::gsbd_fm_events.at(11).at(341).at(idx, 1).as<int*>(), bit);
|
||||
misc::set_bit(globals::gsbd_fm_events.at(11).at(348).at(idx, 1).as<int*>(), bit);
|
||||
misc::set_bit(globals::gpbd_fm_3.at(self::id, globals::size::gpbd_fm_3).at(10).at(205).at(idx, 1).as<int*>(), bit);
|
||||
}
|
||||
|
||||
inline void force_thunder()
|
||||
{
|
||||
session::set_fm_event_index(9);
|
||||
session::set_fm_event_index(10);
|
||||
session::set_fm_event_index(11);
|
||||
}
|
||||
|
||||
inline void join_by_rockstar_id(uint64_t rid)
|
||||
{
|
||||
if (SCRIPT::GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH(RAGE_JOAAT("maintransition")) != 0 ||
|
||||
|
@ -25,37 +25,5 @@ namespace big
|
||||
}
|
||||
ImGui::EndListBox();
|
||||
}
|
||||
if (ImGui::TreeNode("Local Time"))
|
||||
{
|
||||
ImGui::Checkbox("Override Time", &g->session.override_time);
|
||||
|
||||
if (g->session.override_time)
|
||||
{
|
||||
ImGui::SliderInt("Hour", &g->session.custom_time.hour, 0, 23);
|
||||
ImGui::SliderInt("Minute", &g->session.custom_time.minute, 0, 59);
|
||||
ImGui::SliderInt("Second", &g->session.custom_time.second, 0, 59);
|
||||
}
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
if (ImGui::TreeNode("Local Weather"))
|
||||
{
|
||||
components::button("Clear Override", []
|
||||
{
|
||||
MISC::CLEAR_OVERRIDE_WEATHER();
|
||||
});
|
||||
|
||||
if(ImGui::ListBox("", &g->session.local_weather, session::weathers, 15))
|
||||
{
|
||||
g_fiber_pool->queue_job([]
|
||||
{
|
||||
session::local_weather();
|
||||
});
|
||||
|
||||
ImGui::ListBoxFooter();
|
||||
}
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -38,6 +38,7 @@ namespace big
|
||||
static void persist_car();
|
||||
static void fun_vehicle();
|
||||
static void spawn_ped();
|
||||
static void time_and_weather();
|
||||
static void spoofing();
|
||||
static void teleport();
|
||||
static void view_player();
|
||||
|
48
BigBaseV2/src/views/world/view_time_and_weather.cpp
Normal file
48
BigBaseV2/src/views/world/view_time_and_weather.cpp
Normal file
@ -0,0 +1,48 @@
|
||||
#include "views/view.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "util/session.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::time_and_weather()
|
||||
{
|
||||
if (ImGui::TreeNode("Local Time"))
|
||||
{
|
||||
ImGui::Checkbox("Override Time", &g->session.override_time);
|
||||
|
||||
if (g->session.override_time)
|
||||
{
|
||||
ImGui::SliderInt("Hour", &g->session.custom_time.hour, 0, 23);
|
||||
ImGui::SliderInt("Minute", &g->session.custom_time.minute, 0, 59);
|
||||
ImGui::SliderInt("Second", &g->session.custom_time.second, 0, 59);
|
||||
}
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("Local Weather"))
|
||||
{
|
||||
components::button("Clear Override", []
|
||||
{
|
||||
MISC::CLEAR_OVERRIDE_WEATHER();
|
||||
});
|
||||
|
||||
if (ImGui::ListBox("", &g->session.local_weather, session::weathers, 15))
|
||||
{
|
||||
g_fiber_pool->queue_job([]
|
||||
{
|
||||
session::local_weather();
|
||||
});
|
||||
|
||||
ImGui::ListBoxFooter();
|
||||
}
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
components::button("Force Thunder", []
|
||||
{
|
||||
session::force_thunder();
|
||||
});
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user