feat(Self): Part Water (Moses Mode) (#838)
Co-authored-by: TheGreenBandit <106003542+TheGreenBandit@users.noreply.github.com>
This commit is contained in:
parent
c138aaa974
commit
f6a6682c86
32
src/backend/looped/self/part_water.cpp
Normal file
32
src/backend/looped/self/part_water.cpp
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#include "backend/looped/looped.hpp"
|
||||||
|
#include "natives.hpp"
|
||||||
|
#include "backend/looped_command.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
class partwater : looped_command
|
||||||
|
{
|
||||||
|
using looped_command::looped_command;
|
||||||
|
|
||||||
|
virtual void on_tick() override
|
||||||
|
{
|
||||||
|
Vector3 coords = self::pos;
|
||||||
|
float offset[] = { -4, 4 };
|
||||||
|
|
||||||
|
for (int i = 0; i < 5; i++)
|
||||||
|
{
|
||||||
|
if (i < 2)
|
||||||
|
{
|
||||||
|
coords.x += offset[(i % 2 == 0)];
|
||||||
|
}
|
||||||
|
else if (i < 4)
|
||||||
|
{
|
||||||
|
coords.y += offset[(i % 2 == 0)];
|
||||||
|
}
|
||||||
|
WATER::MODIFY_WATER(coords.x, coords.y, -500000.0f, 0.2f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
partwater g_partwater("partwater", "Part Water", "Makes you like Moses", g.world.water.part_water);
|
||||||
|
}
|
@ -11,7 +11,7 @@ namespace big
|
|||||||
{
|
{
|
||||||
int trainSpeed = ENTITY::GET_ENTITY_SPEED(train::get_closest_train());
|
int trainSpeed = ENTITY::GET_ENTITY_SPEED(train::get_closest_train());
|
||||||
|
|
||||||
if (g.train.drive_train)
|
if (g.world.train.drive_train)
|
||||||
{
|
{
|
||||||
if (PAD::IS_CONTROL_PRESSED(0, 71))
|
if (PAD::IS_CONTROL_PRESSED(0, 71))
|
||||||
trainSpeed++;
|
trainSpeed++;
|
||||||
@ -27,6 +27,6 @@ namespace big
|
|||||||
int train = train::get_closest_train();
|
int train = train::get_closest_train();
|
||||||
|
|
||||||
if (train != 0)
|
if (train != 0)
|
||||||
VEHICLE::SET_RENDER_TRAIN_AS_DERAILED(train, g.train.derail_train);
|
VEHICLE::SET_RENDER_TRAIN_AS_DERAILED(train, g.world.train.derail_train);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -181,10 +181,9 @@ namespace big
|
|||||||
struct player
|
struct player
|
||||||
{
|
{
|
||||||
int character_slot = 1;
|
int character_slot = 1;
|
||||||
int set_level = 130;
|
|
||||||
bool spectating = false;
|
bool spectating = false;
|
||||||
|
|
||||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(player, character_slot, set_level, spectating)
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(player, character_slot, spectating)
|
||||||
} player{};
|
} player{};
|
||||||
|
|
||||||
struct protections
|
struct protections
|
||||||
@ -244,6 +243,7 @@ namespace big
|
|||||||
bool no_water_collision = false;
|
bool no_water_collision = false;
|
||||||
int wanted_level = 0;
|
int wanted_level = 0;
|
||||||
bool god_mode = false;
|
bool god_mode = false;
|
||||||
|
bool part_water = false;
|
||||||
bool proof_bullet = false;
|
bool proof_bullet = false;
|
||||||
bool proof_fire = false;
|
bool proof_fire = false;
|
||||||
bool proof_collision = false;
|
bool proof_collision = false;
|
||||||
@ -270,7 +270,7 @@ namespace big
|
|||||||
|
|
||||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(self,
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(self,
|
||||||
clean_player, force_wanted_level, free_cam, invisibility, local_visibility, never_wanted, no_ragdoll,
|
clean_player, force_wanted_level, free_cam, invisibility, local_visibility, never_wanted, no_ragdoll,
|
||||||
noclip, off_radar, super_run, no_collision, unlimited_oxygen, no_water_collision, wanted_level, god_mode,
|
noclip, off_radar, super_run, no_collision, unlimited_oxygen, no_water_collision, wanted_level, god_mode, part_water,
|
||||||
proof_bullet, proof_fire, proof_collision, proof_melee, proof_explosion, proof_steam, proof_drown, proof_water,
|
proof_bullet, proof_fire, proof_collision, proof_melee, proof_explosion, proof_steam, proof_drown, proof_water,
|
||||||
proof_mask, hide_radar, hide_ammo, selected_hud_component, hud_components_states, force_show_hud_element,
|
proof_mask, hide_radar, hide_ammo, selected_hud_component, hud_components_states, force_show_hud_element,
|
||||||
force_show_hud, mobile_radio, fast_respawn, auto_tp, super_jump, beast_jump)
|
force_show_hud, mobile_radio, fast_respawn, auto_tp, super_jump, beast_jump)
|
||||||
@ -396,6 +396,20 @@ namespace big
|
|||||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(clone_pv, preview_vehicle, spawn_inside, spawn_clone, spawn_maxed, clone_plate, plate)
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(clone_pv, preview_vehicle, spawn_inside, spawn_clone, spawn_maxed, clone_plate, plate)
|
||||||
} clone_pv{};
|
} clone_pv{};
|
||||||
|
|
||||||
|
struct world
|
||||||
|
{
|
||||||
|
struct train
|
||||||
|
{
|
||||||
|
bool derail_train = false;
|
||||||
|
bool drive_train = false;
|
||||||
|
} train{};
|
||||||
|
|
||||||
|
struct water
|
||||||
|
{
|
||||||
|
bool part_water = false;
|
||||||
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(water, part_water)
|
||||||
|
} water{};
|
||||||
|
|
||||||
struct spawn_ped
|
struct spawn_ped
|
||||||
{
|
{
|
||||||
bool preview_ped = false;
|
bool preview_ped = false;
|
||||||
@ -403,11 +417,17 @@ namespace big
|
|||||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(spawn_ped, preview_ped)
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(spawn_ped, preview_ped)
|
||||||
} spawn_ped{};
|
} spawn_ped{};
|
||||||
|
|
||||||
struct train
|
struct custom_time
|
||||||
{
|
{
|
||||||
bool derail_train = false;
|
int local_weather = 0;
|
||||||
bool drive_train = false;
|
bool override_time = {};
|
||||||
} train{};
|
bool override_weather = false;
|
||||||
|
int hour{}, minute{}, second{};
|
||||||
|
|
||||||
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(custom_time, local_weather, hour, minute, second)
|
||||||
|
} custom_time;
|
||||||
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(world, water, spawn_ped, custom_time)
|
||||||
|
} world{};
|
||||||
|
|
||||||
struct spoofing
|
struct spoofing
|
||||||
{
|
{
|
||||||
@ -663,10 +683,9 @@ namespace big
|
|||||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(ugc, infinite_model_memory)
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(ugc, infinite_model_memory)
|
||||||
} ugc{};
|
} ugc{};
|
||||||
|
|
||||||
|
|
||||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(menu_settings,
|
NLOHMANN_DEFINE_TYPE_INTRUSIVE(menu_settings,
|
||||||
debug, tunables, notifications, player, protections, self, session, settings, spawn_vehicle, clone_pv,
|
debug, tunables, notifications, player, protections, self, session, settings, spawn_vehicle, clone_pv,
|
||||||
spawn_ped, spoofing, vehicle, weapons, window, context_menu, esp, session_browser, ugc, reactions)
|
spoofing, vehicle, weapons, window, context_menu, esp, session_browser, ugc, reactions, world)
|
||||||
};
|
};
|
||||||
|
|
||||||
inline auto g = menu_settings();
|
inline auto g = menu_settings();
|
||||||
|
@ -28,6 +28,7 @@ namespace big
|
|||||||
TIME_AND_WEATHER,
|
TIME_AND_WEATHER,
|
||||||
CREATOR,
|
CREATOR,
|
||||||
TRAIN,
|
TRAIN,
|
||||||
|
WATER,
|
||||||
|
|
||||||
NETWORK,
|
NETWORK,
|
||||||
SESSION,
|
SESSION,
|
||||||
@ -80,7 +81,8 @@ namespace big
|
|||||||
{ tabs::SPAWN_PED, { "Spawn Ped", view::spawn_ped }},
|
{ tabs::SPAWN_PED, { "Spawn Ped", view::spawn_ped }},
|
||||||
{ tabs::TIME_AND_WEATHER, { "Time And Weather", view::time_and_weather }},
|
{ tabs::TIME_AND_WEATHER, { "Time And Weather", view::time_and_weather }},
|
||||||
{ tabs::CREATOR, { "Creator", view::creator }},
|
{ tabs::CREATOR, { "Creator", view::creator }},
|
||||||
{ tabs::TRAIN, { "Train", view::train }}
|
{ tabs::TRAIN, { "Train", view::train }},
|
||||||
|
{ tabs::WATER, { "Water", view::water }},
|
||||||
}}},
|
}}},
|
||||||
{tabs::NETWORK, { "Network", nullptr, {
|
{tabs::NETWORK, { "Network", nullptr, {
|
||||||
{ tabs::SPOOFING, { "Spoofing", view::spoofing }},
|
{ tabs::SPOOFING, { "Spoofing", view::spoofing }},
|
||||||
|
@ -49,6 +49,7 @@ namespace big
|
|||||||
static void gta_data();
|
static void gta_data();
|
||||||
static void creator();
|
static void creator();
|
||||||
static void train();
|
static void train();
|
||||||
|
static void water();
|
||||||
|
|
||||||
static void player_info();
|
static void player_info();
|
||||||
static void player_troll();
|
static void player_troll();
|
||||||
|
@ -242,7 +242,7 @@ namespace big
|
|||||||
selected_ped_player_id = -1;
|
selected_ped_player_id = -1;
|
||||||
g_model_preview_service->stop_preview();
|
g_model_preview_service->stop_preview();
|
||||||
}
|
}
|
||||||
else if (!g.spawn_ped.preview_ped || (g.spawn_ped.preview_ped && !ImGui::IsAnyItemHovered()))
|
else if (!g.world.spawn_ped.preview_ped || (g.world.spawn_ped.preview_ped && !ImGui::IsAnyItemHovered()))
|
||||||
{
|
{
|
||||||
g_model_preview_service->stop_preview();
|
g_model_preview_service->stop_preview();
|
||||||
}
|
}
|
||||||
@ -273,7 +273,7 @@ namespace big
|
|||||||
selected_ped_player_id = plyr_id;
|
selected_ped_player_id = plyr_id;
|
||||||
g_model_preview_service->stop_preview();
|
g_model_preview_service->stop_preview();
|
||||||
}
|
}
|
||||||
else if (!g.spawn_ped.preview_ped || (g.spawn_ped.preview_ped && !ImGui::IsAnyItemHovered()))
|
else if (!g.world.spawn_ped.preview_ped || (g.world.spawn_ped.preview_ped && !ImGui::IsAnyItemHovered()))
|
||||||
{
|
{
|
||||||
g_model_preview_service->stop_preview();
|
g_model_preview_service->stop_preview();
|
||||||
}
|
}
|
||||||
@ -387,7 +387,7 @@ namespace big
|
|||||||
|
|
||||||
ped_model_dropdown_open = ped_model_dropdown_focused;
|
ped_model_dropdown_open = ped_model_dropdown_focused;
|
||||||
|
|
||||||
if (!g.spawn_ped.preview_ped || (g.spawn_ped.preview_ped && (!item_hovered || !ped_model_dropdown_open)))
|
if (!g.world.spawn_ped.preview_ped || (g.world.spawn_ped.preview_ped && (!item_hovered || !ped_model_dropdown_open)))
|
||||||
{
|
{
|
||||||
g_model_preview_service->stop_preview();
|
g_model_preview_service->stop_preview();
|
||||||
}
|
}
|
||||||
@ -551,9 +551,9 @@ namespace big
|
|||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
|
||||||
|
|
||||||
if (ImGui::Checkbox("Preview", &g.spawn_ped.preview_ped))
|
if (ImGui::Checkbox("Preview", &g.world.spawn_ped.preview_ped))
|
||||||
{
|
{
|
||||||
if (!g.spawn_ped.preview_ped)
|
if (!g.world.spawn_ped.preview_ped)
|
||||||
{
|
{
|
||||||
g_model_preview_service->stop_preview();
|
g_model_preview_service->stop_preview();
|
||||||
}
|
}
|
||||||
|
@ -36,11 +36,11 @@ namespace big
|
|||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
components::button("Set", [] { train::set_train_speed(train_speed); });
|
components::button("Set", [] { train::set_train_speed(train_speed); });
|
||||||
|
|
||||||
ImGui::Checkbox("Drive Train", &g.train.drive_train);
|
ImGui::Checkbox("Drive Train", &g.world.train.drive_train);
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
|
||||||
ImGui::Checkbox("Derail Train", &g.train.derail_train);
|
ImGui::Checkbox("Derail Train", &g.world.train.derail_train);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
10
src/views/world/view_water.cpp
Normal file
10
src/views/world/view_water.cpp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#include "fiber_pool.hpp"
|
||||||
|
#include "views/view.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
void view::water()
|
||||||
|
{
|
||||||
|
components::command_checkbox<"partwater">();
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user