feat: Some small additions (#755)
This commit is contained in:
parent
a83b9523cc
commit
2b1aee98de
@ -1,6 +1,7 @@
|
||||
include(FetchContent)
|
||||
|
||||
set(BUILD_TESTING_BEFORE ${BUILD_TESTING})
|
||||
set(CURL_DISABLE_TESTS OFF)
|
||||
FetchContent_Declare(
|
||||
cpr
|
||||
GIT_REPOSITORY https://github.com/libcpr/cpr.git
|
||||
|
@ -633,10 +633,17 @@ namespace big
|
||||
player_count_filter_minimum, player_count_filter_maximum, sort_method, sort_direction, replace_game_matchmaking)
|
||||
} session_browser{};
|
||||
|
||||
struct ugc
|
||||
{
|
||||
bool infinite_model_memory;
|
||||
|
||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(ugc, infinite_model_memory)
|
||||
} ugc{};
|
||||
|
||||
|
||||
NLOHMANN_DEFINE_TYPE_INTRUSIVE(menu_settings,
|
||||
debug, tunables, notifications, player, protections, self, session, settings, spawn_vehicle, clone_pv,
|
||||
spawn_ped, spoofing, vehicle, weapons, window, context_menu, esp, session_browser)
|
||||
spawn_ped, spoofing, vehicle, weapons, window, context_menu, esp, session_browser, ugc)
|
||||
};
|
||||
|
||||
inline auto g = menu_settings();
|
||||
|
@ -47,6 +47,12 @@ namespace rage
|
||||
{
|
||||
*reinterpret_cast<std::remove_cv_t<std::remove_reference_t<T>>*>(m_return_value) = std::forward<T>(value);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void set_return_value(T& value)
|
||||
{
|
||||
*reinterpret_cast<std::remove_cv_t<std::remove_reference_t<T>>*>(m_return_value) = std::forward<T>(value);
|
||||
}
|
||||
protected:
|
||||
void *m_return_value;
|
||||
std::uint32_t m_arg_count;
|
||||
|
@ -27,12 +27,13 @@ namespace big
|
||||
void IS_DLC_PRESENT(rage::scrNativeCallContext* src)
|
||||
{
|
||||
const auto hash = src->get_arg<rage::joaat_t>(0);
|
||||
|
||||
bool return_value = DLC::IS_DLC_PRESENT(hash);
|
||||
|
||||
BOOL return_value = DLC::IS_DLC_PRESENT(hash);
|
||||
|
||||
if (hash == 0x96F02EE6)
|
||||
return_value = return_value || g.settings.dev_dlc;
|
||||
|
||||
src->set_return_value(return_value);
|
||||
src->set_return_value<BOOL>(return_value);
|
||||
}
|
||||
|
||||
void NETWORK_SET_THIS_SCRIPT_IS_NETWORK_SCRIPT(rage::scrNativeCallContext* src)
|
||||
|
@ -35,5 +35,13 @@ namespace big
|
||||
|
||||
src->set_return_value<Hash>(std::move(model));
|
||||
}
|
||||
|
||||
void GET_USED_CREATOR_BUDGET(rage::scrNativeCallContext* src)
|
||||
{
|
||||
if (g.ugc.infinite_model_memory)
|
||||
src->set_return_value<float>(0);
|
||||
else
|
||||
src->set_return_value<float>(STREAMING::GET_USED_CREATOR_BUDGET());
|
||||
}
|
||||
}
|
||||
}
|
@ -133,6 +133,13 @@ namespace big
|
||||
add_native_detour(RAGE_JOAAT("fm_capture_creator"), 0x9F47B058362C84B5, creator::GET_ENTITY_MODEL);
|
||||
add_native_detour(RAGE_JOAAT("fm_deathmatch_creator"), 0x9F47B058362C84B5, creator::GET_ENTITY_MODEL);
|
||||
add_native_detour(RAGE_JOAAT("fm_lts_creator"), 0x9F47B058362C84B5, creator::GET_ENTITY_MODEL);
|
||||
|
||||
// Infinite Model Memory
|
||||
add_native_detour(RAGE_JOAAT("fm_race_creator"), 0x3D3D8B3BE5A83D35, creator::GET_USED_CREATOR_BUDGET);
|
||||
add_native_detour(RAGE_JOAAT("fm_capture_creator"), 0x3D3D8B3BE5A83D35, creator::GET_USED_CREATOR_BUDGET);
|
||||
add_native_detour(RAGE_JOAAT("fm_deathmatch_creator"), 0x3D3D8B3BE5A83D35, creator::GET_USED_CREATOR_BUDGET);
|
||||
add_native_detour(RAGE_JOAAT("fm_lts_creator"), 0x3D3D8B3BE5A83D35, creator::GET_USED_CREATOR_BUDGET);
|
||||
add_native_detour(RAGE_JOAAT("fm_survival_creator"), 0x3D3D8B3BE5A83D35, creator::GET_USED_CREATOR_BUDGET);
|
||||
|
||||
for (auto& entry : *g_pointers->m_script_program_table)
|
||||
if (entry.m_program)
|
||||
|
@ -43,6 +43,16 @@ namespace big::mobile
|
||||
{
|
||||
*script_global(scr_globals::mechanic_global).at(888).as<int*>() = 1;
|
||||
}
|
||||
|
||||
inline void request_backup_helicopter()
|
||||
{
|
||||
*script_global(scr_globals::mechanic_global).at(4484).as<int*>() = 1;
|
||||
}
|
||||
|
||||
inline void request_airstrike()
|
||||
{
|
||||
*script_global(scr_globals::mechanic_global).at(4485).as<int*>() = 1;
|
||||
}
|
||||
}
|
||||
|
||||
namespace mors_mutual
|
||||
@ -85,6 +95,14 @@ namespace big::mobile
|
||||
}
|
||||
}
|
||||
|
||||
namespace ceo_abilities
|
||||
{
|
||||
inline void request_bullshark_testosterone()
|
||||
{
|
||||
*script_global(2672505).at(3689).as<int*>() = 1;
|
||||
}
|
||||
}
|
||||
|
||||
namespace mechanic
|
||||
{
|
||||
inline Vehicle get_personal_vehicle()
|
||||
|
@ -23,7 +23,8 @@ namespace big
|
||||
g_fiber_pool->queue_job([]
|
||||
{
|
||||
for (auto& command : g_looped_commands)
|
||||
command->on_disable();
|
||||
if (command->is_enabled())
|
||||
command->on_disable();
|
||||
|
||||
g_running = false;
|
||||
});
|
||||
|
@ -9,7 +9,6 @@ namespace big
|
||||
ImGui::SetWindowSize({ 0.f, (float)*g_pointers->m_resolution_y }, ImGuiCond_Always);
|
||||
|
||||
components::sub_title("Merryweather");
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
components::button("Request Ammo Drop", [] {
|
||||
@ -20,6 +19,15 @@ namespace big
|
||||
mobile::merry_weather::request_helicopter_pickup();
|
||||
});
|
||||
|
||||
components::button("Request Backup Helicopter", [] {
|
||||
mobile::merry_weather::request_backup_helicopter();
|
||||
});
|
||||
|
||||
components::button("Request Airstrike", [] {
|
||||
mobile::merry_weather::request_airstrike();
|
||||
});
|
||||
|
||||
components::sub_title("Mors Mutual");
|
||||
ImGui::Separator();
|
||||
|
||||
components::button("Mors Mutual Fix All Vehicles", [] {
|
||||
@ -28,5 +36,13 @@ namespace big
|
||||
std::format("{} vehicle{} been fixed.", amount_fixed, amount_fixed == 1 ? " has" : "s have")
|
||||
);
|
||||
});
|
||||
|
||||
components::sub_title("CEO Abilities");
|
||||
ImGui::Separator();
|
||||
|
||||
components::button("Bullshark Testosterone", [] {
|
||||
mobile::ceo_abilities::request_bullshark_testosterone();
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -114,5 +114,13 @@ namespace big
|
||||
components::button("Deathmatch", [] { scripts::start_creator_script(RAGE_JOAAT("fm_deathmatch_creator")); }); ImGui::SameLine();
|
||||
components::button("LTS", [] { scripts::start_creator_script(RAGE_JOAAT("fm_lts_creator")); });
|
||||
ImGui::EndGroup();
|
||||
|
||||
components::sub_title("Creator Options");
|
||||
ImGui::BeginGroup();
|
||||
ImGui::Checkbox("Infinite Model Memory", &g.ugc.infinite_model_memory);
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::SetTooltip("Infinite Model Memory is only useful if dev mode is not activated");
|
||||
|
||||
ImGui::EndGroup();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user