Feature Additions, GUI Tweaks, Fixes (#975)
* Added view nearby to view header, moved get_entities function to entities and refactored some code. Also implemented a sphere scale to the blackhole as it can get big * added delete and kill nearby peds and updated ped header * added some nearby ped looped commands, and some changes to extend the buttons * add vehicle options to nearby * add most ciritcal feature kill enemies * changes to ignore peds based off of some of maybegreat's suggestions, same with ped_rain, removed loose comment. Updated vehicle.hpp, changed size of vehicle buttons and inlined kill enemies * fixed a problem where the vehicle options crashed + added color * updated colors and added on disable for ped_rush * finished and added vehicle rain feature * added aimbot and triggerbot, added templating to buttons * update vehicle rain desc * added vdistance check, player check, police check, enemy check. Added even more commenting... sue me. 3 toggles added for the checks and slider for dist. Will tweak more later * switched to goto statements instead of continue, should be done now * removed delete nearby vehicles * there was no check in get_entities for our local vehicle
This commit is contained in:
@ -8,14 +8,15 @@ namespace big
|
||||
components::command_checkbox<"blackhole">();
|
||||
|
||||
components::sub_title("Entities");
|
||||
ImGui::Checkbox("Vehicles", &g.world.blackhole.include_vehicles);
|
||||
components::command_checkbox<"blackholeincvehs">();
|
||||
ImGui::SameLine();
|
||||
ImGui::Checkbox("Peds", &g.world.blackhole.include_peds);
|
||||
components::command_checkbox<"blackholeincpeds">();
|
||||
|
||||
components::sub_title("Position");
|
||||
ImGui::InputFloat("X", &g.world.blackhole.pos.x, 5.f, 200.f);
|
||||
ImGui::InputFloat("Y", &g.world.blackhole.pos.y, 5.f, 200.f);
|
||||
ImGui::InputFloat("Z", &g.world.blackhole.pos.z, 5.f, 200.f);
|
||||
ImGui::SliderFloat("Scale", &g.world.blackhole.scale, 2.f, 12.f, "%.0f");
|
||||
|
||||
components::button("Set to current coords", [] {
|
||||
const auto player_pos = g_local_player->get_position();
|
||||
|
76
src/views/world/view_nearby.cpp
Normal file
76
src/views/world/view_nearby.cpp
Normal file
@ -0,0 +1,76 @@
|
||||
#include "views/view.hpp"
|
||||
#include "util/local_player.hpp"
|
||||
#include "util/entity.hpp"
|
||||
#include "util/ped.hpp"
|
||||
#include "util/vehicle.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::nearby()
|
||||
{
|
||||
components::sub_title("Peds");
|
||||
// Nearby Ped Actions
|
||||
components::button<ImVec2(110, 0)>
|
||||
("Delete", []
|
||||
{
|
||||
for (auto peds : entity::get_entities(false, true))
|
||||
{
|
||||
entity::delete_entity(peds);
|
||||
}
|
||||
}); ImGui::SameLine();
|
||||
|
||||
components::button<ImVec2(110, 0), ImVec4(0.70196f, 0.3333f, 0.00392f, 1.f)>
|
||||
("Kill", []
|
||||
{
|
||||
for (auto peds : entity::get_entities(false, true))
|
||||
{
|
||||
ped::kill_ped(peds);
|
||||
}
|
||||
}); ImGui::SameLine();
|
||||
|
||||
components::button<ImVec2(110, 0), ImVec4(0.76078f, 0.f, 0.03529f, 1.f)>
|
||||
("Kill Enemies", []
|
||||
{
|
||||
for (auto peds : entity::get_entities(false, true))
|
||||
{
|
||||
ped::kill_ped_by_relation(peds, 4 || 5);
|
||||
}
|
||||
});
|
||||
|
||||
// Nearby Ped Loops / Toggles
|
||||
components::command_checkbox<"pedsignore">(); ImGui::SameLine(140.f);
|
||||
components::command_checkbox<"pedrain">();
|
||||
components::command_checkbox<"highalert">(); ImGui::SameLine(140.f);
|
||||
components::command_checkbox<"pedrush">();
|
||||
|
||||
ImGui::Separator();
|
||||
components::sub_title("Vehicles");
|
||||
// Nearby Vehicle Actions
|
||||
|
||||
components::button<ImVec2(110, 0), ImVec4(0.02745f, 0.4745f, 0.10196f, 1.f)>
|
||||
("Max Upgrade", [] {
|
||||
for (auto vehs : entity::get_entities(true, false))
|
||||
{
|
||||
if (entity::take_control_of(vehs))
|
||||
{
|
||||
vehicle::max_vehicle(vehs);
|
||||
script::get_current()->yield();
|
||||
}
|
||||
}
|
||||
}); ImGui::SameLine();
|
||||
|
||||
components::button<ImVec2(110, 0), ImVec4(0.4549f, 0.03529f, 0.03529f, 1.f)>
|
||||
("Downgrade", [] {
|
||||
for (auto vehs : entity::get_entities(true, false))
|
||||
{
|
||||
if (entity::take_control_of(vehs))
|
||||
{
|
||||
vehicle::downgrade(vehs);
|
||||
script::get_current()->yield();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
components::command_checkbox<"vehiclerain">();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user