Huge protection improvements and other stuff (#1963)

* feat(protections): add a fuzzer
* feat(protections): improve protections
* feat(spoofing): add warning
* feat(world): force object cleanup
* fix(weapons): fix custom weapon code
* fix(weapons): fix for #1983
This commit is contained in:
maybegreat48
2023-08-19 11:01:08 +00:00
committed by GitHub
parent 62c0c30c1a
commit 4a5dccd547
119 changed files with 15159 additions and 20135 deletions

View File

@ -107,8 +107,8 @@ namespace big
std::string teleport_name_string = global_name;
if (!teleport_name_string.empty())
{
auto json = get_globals_json();
json[global_name] = global_obj;
auto json = get_globals_json();
json[teleport_name_string] = global_obj;
auto file_path = g_file_manager.get_project_file("./globals.json").get_path();
std::ofstream file(file_path, std::ios::out | std::ios::trunc);

View File

@ -1,6 +1,7 @@
#include "gta/joaat.hpp"
#include "gta_util.hpp"
#include "gui/components/components.hpp"
#include "hooking.hpp"
#include "natives.hpp"
#include "network/Network.hpp"
#include "script.hpp"
@ -11,8 +12,6 @@
#include "util/system.hpp"
#include "view_debug.hpp"
#include "hooking.hpp"
namespace big
{
void debug::misc()
@ -95,6 +94,18 @@ namespace big
components::command_button<"fastquit">();
if (ImGui::TreeNode("Fuzzer"))
{
ImGui::Checkbox("Enabled", &g.debug.fuzzer.enabled);
for (int i = 0; i < net_object_type_strs.size(); i++)
{
ImGui::Checkbox(net_object_type_strs[i], &g.debug.fuzzer.enabled_object_types[i]);
}
ImGui::TreePop();
}
if (ImGui::TreeNode("ADDRESSES"_T.data()))
{
uint64_t local_cped = (uint64_t)g_local_player;

View File

@ -215,6 +215,7 @@ namespace big
ImGui::Checkbox("OFF_THE_RADAR"_T.data(), &g.session.off_radar_all);
ImGui::Checkbox("NEVER_WANTED"_T.data(), &g.session.never_wanted_all);
ImGui::Checkbox("SEMI_GODMODE"_T.data(), &g.session.semi_godmode_all);
ImGui::Checkbox("Fix Vehicle", &g.session.vehicle_fix_all);
ImGui::Checkbox("EXPLOSION_KARMA"_T.data(), &g.session.explosion_karma);
ImGui::Checkbox("DAMAGE_KARMA"_T.data(), &g.session.damage_karma);
ImGui::Checkbox("DISABLE_PEDS"_T.data(), &g.session.disable_peds);

View File

@ -27,9 +27,15 @@ namespace big
ImGui::SameLine();
components::player_command_button<"giveweaps">(g_player_service->get_selected(), {});
ImGui::BeginGroup();
ImGui::Checkbox("OFF_THE_RADAR"_T.data(), &g_player_service->get_selected()->off_radar);
ImGui::Checkbox("NEVER_WANTED"_T.data(), &g_player_service->get_selected()->never_wanted);
ImGui::Checkbox("SEMI_GODMODE"_T.data(), &g_player_service->get_selected()->semi_godmode);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::Checkbox("Fix Vehicle", &g_player_service->get_selected()->fix_vehicle);
ImGui::EndListBox();
}

View File

@ -36,10 +36,20 @@ namespace big
ImGui::SameLine();
components::player_command_button<"closedoors">(g_player_service->get_selected(), {});
components::player_command_button<"breakdoors">(g_player_service->get_selected(), {});
components::player_command_button<"upgradeveh">(g_player_service->get_selected(), {});
ImGui::SameLine();
components::player_command_button<"downgradeveh">(g_player_service->get_selected(), {});
components::player_command_button<"svehjump">(g_player_service->get_selected(), {});
ImGui::SameLine();
components::player_command_button<"svehboost">(g_player_service->get_selected(), {});
components::player_command_button<"sshuntleft">(g_player_service->get_selected(), {});
ImGui::SameLine();
components::player_command_button<"sshuntright">(g_player_service->get_selected(), {});
components::player_command_button<"rcplayer">(g_player_service->get_selected());
ImGui::EndListBox();

View File

@ -18,7 +18,6 @@ namespace big
ImGui::BeginGroup();
ImGui::Checkbox("BOUNTY"_T.data(), &g.protections.script_events.bounty);
ImGui::Checkbox("CEO_MONEY"_T.data(), &g.protections.script_events.ceo_money);
ImGui::Checkbox("FAKE_DEPOSIT"_T.data(), &g.protections.script_events.fake_deposit);
ImGui::Checkbox("FORCE_MISSION"_T.data(), &g.protections.script_events.force_mission);
ImGui::Checkbox("FORCE_TELEPORT"_T.data(), &g.protections.script_events.force_teleport);
ImGui::Checkbox("GTA_BANNER"_T.data(), &g.protections.script_events.gta_banner);
@ -34,12 +33,12 @@ namespace big
ImGui::Checkbox("PERSONAL_VEHICLE_DESTROYED"_T.data(), &g.protections.script_events.personal_vehicle_destroyed);
ImGui::Checkbox("REMOTE_OFF_RADAR"_T.data(), &g.protections.script_events.remote_off_radar);
ImGui::Checkbox("ROTATE_CAM"_T.data(), &g.protections.script_events.rotate_cam);
ImGui::Checkbox("TELEPORT_TO_WAREHOUSE"_T.data(), &g.protections.script_events.teleport_to_warehouse);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
ImGui::Checkbox("TELEPORT_TO_WAREHOUSE"_T.data(), &g.protections.script_events.teleport_to_warehouse);
ImGui::Checkbox("START_ACTIVITY"_T.data(), &g.protections.script_events.start_activity);
ImGui::Checkbox("SEND_SMS"_T.data(), &g.protections.script_events.send_sms);
ImGui::Checkbox("SPECTATE"_T.data(), &g.protections.script_events.spectate);

View File

@ -327,13 +327,20 @@ namespace big
if (selected_slot >= 0)
{
VEHICLE::SET_VEHICLE_MOD(player_vehicle, selected_slot, mod, false);
owned_mods[selected_slot] = mod;
if (is_wheel_mod)
if (!VEHICLE::IS_VEHICLE_MOD_GEN9_EXCLUSIVE(player_vehicle, selected_slot, mod))
{
*wheel_stock_mod = mod;
*wheel_custom = false;
VEHICLE::SET_VEHICLE_MOD(player_vehicle, selected_slot, mod, false);
owned_mods[selected_slot] = mod;
if (is_wheel_mod)
{
*wheel_stock_mod = mod;
*wheel_custom = false;
}
}
else
{
g_notification_service->push_error("LSC", "Selected mod is invalid");
}
}
else if (selected_slot == MOD_WINDOW_TINT)

View File

@ -2,7 +2,6 @@
#include "debug/view_debug.hpp"
#include "esp/view_esp.hpp"
#include "gui/components/components.hpp"
#include "util/animator.hpp"
//Percentage of window space
constexpr auto listbox_width = 0.5f;
@ -18,7 +17,6 @@ namespace big
class view
{
inline static animator window_animator = animator();
inline static ImGuiWindowFlags window_flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoNav;
public:

View File

@ -224,7 +224,7 @@ namespace big
}
}
ImGui::SeparatorText("PED_MODEL"_T.data());
{
ImGui::BeginGroup();
@ -429,7 +429,7 @@ namespace big
}
ImGui::Separator();
ImGui::SeparatorText("WEAPON"_T.data());
{
ImGui::BeginGroup();
@ -489,9 +489,11 @@ namespace big
ImGui::SetNextItemWidth(240.f);
if (ImGui::BeginCombo("##ped_weapon",
selected_ped_weapon_type == SPAWN_PED_NO_WEAPONS ? "NO_WEAPONS"_T.data() :
selected_ped_weapon_hash == 0 ? "ALL"_T.data() :
g_gta_data_service->weapon_by_hash(selected_ped_weapon_hash).m_display_name.c_str()))
selected_ped_weapon_type == SPAWN_PED_NO_WEAPONS ?
"NO_WEAPONS"_T.data() :
selected_ped_weapon_hash == 0 ?
"ALL"_T.data() :
g_gta_data_service->weapon_by_hash(selected_ped_weapon_hash).m_display_name.c_str()))
{
if (selected_ped_weapon_type != SPAWN_PED_NO_WEAPONS)
{
@ -529,7 +531,7 @@ namespace big
}
ImGui::Separator();
ImGui::SeparatorText("SPAWN_FOR"_T.data());
{
if (ImGui::BeginCombo("##ped_for",
@ -658,6 +660,17 @@ namespace big
g.spoofing.player_model = ped_model_buf;
});
if (ImGui::IsItemHovered())
ImGui::SetTooltip("This WILL break freemode missions and jobs");
if (g.spoofing.spoof_player_model)
{
ImGui::SameLine();
components::button("Unspoof Model", [] {
g.spoofing.spoof_player_model = false;
});
}
components::button("Cleanup Spawned Peds", [] {
for (auto& ped : spawned_peds)
{

View File

@ -38,5 +38,7 @@ namespace big
ImGui::EndCombo();
}
}
components::command_checkbox<"blackout">();
}
}

View File

@ -1,3 +1,4 @@
#include "pointers.hpp"
#include "util/entity.hpp"
#include "util/notify.hpp"
#include "util/ped.hpp"
@ -82,7 +83,7 @@ namespace big
ImGui::SeparatorText("Entities");
static bool included_entity_types[3];
static bool own_vehicle, deleting;
static bool own_vehicle, deleting, force;
static int quantity, remaining;
ImGui::Text("Include:");
@ -93,7 +94,12 @@ namespace big
ImGui::Checkbox("Props", &included_entity_types[2]);
if (included_entity_types[0])
{
ImGui::Checkbox("Self vehicle", &own_vehicle);
ImGui::SameLine();
}
ImGui::Checkbox("Force", &force);
if (deleting)
{
@ -122,8 +128,22 @@ namespace big
if (ent == self::veh && own_vehicle)
TASK::CLEAR_PED_TASKS_IMMEDIATELY(self::ped);
if (entity::take_control_of(ent, 25))
entity::delete_entity(ent);
if (force)
{
auto ptr = g_pointers->m_gta.m_handle_to_ptr(ent);
switch (ptr->m_entity_type)
{
case 4: g_pointers->m_gta.m_delete_ped(reinterpret_cast<CPed*>(ptr)); break;
case 3: g_pointers->m_gta.m_delete_vehicle(reinterpret_cast<CVehicle*>(ptr)); break;
case 5: g_pointers->m_gta.m_delete_object(reinterpret_cast<CObject*>(ptr), false); break;
}
}
else
{
if (entity::take_control_of(ent, 25))
entity::delete_entity(ent);
}
}
if (ENTITY::DOES_ENTITY_EXIST(ent))