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:
@ -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)
|
||||
{
|
||||
|
@ -38,5 +38,7 @@ namespace big
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
}
|
||||
|
||||
components::command_checkbox<"blackout">();
|
||||
}
|
||||
}
|
||||
|
@ -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))
|
||||
|
Reference in New Issue
Block a user