2023-02-08 22:50:26 +01:00
|
|
|
#include "backend/looped_command.hpp"
|
2023-03-01 21:27:15 +00:00
|
|
|
#include "gta_util.hpp"
|
|
|
|
#include "natives.hpp"
|
2023-02-08 22:50:26 +01:00
|
|
|
#include "pointers.hpp"
|
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
2023-02-25 13:33:16 -07:00
|
|
|
#include "util/entity.hpp"
|
2023-03-01 21:27:15 +00:00
|
|
|
#include "util/mobile.hpp"
|
2023-02-08 22:50:26 +01:00
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
|
|
|
class blackhole : looped_command
|
|
|
|
{
|
|
|
|
using looped_command::looped_command;
|
|
|
|
|
|
|
|
virtual void on_tick() override
|
|
|
|
{
|
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
2023-02-25 13:33:16 -07:00
|
|
|
for (auto entity : entity::get_entities(g.world.blackhole.include_vehicles, g.world.blackhole.include_peds))
|
2023-02-08 22:50:26 +01:00
|
|
|
{
|
2023-02-13 20:38:30 +00:00
|
|
|
if (entity::take_control_of(entity, 0))
|
|
|
|
{
|
|
|
|
auto entity_coord = ENTITY::GET_ENTITY_COORDS(entity, false);
|
2023-03-01 21:27:15 +00:00
|
|
|
ENTITY::APPLY_FORCE_TO_ENTITY(entity,
|
|
|
|
1,
|
|
|
|
((g.world.blackhole.pos.x - entity_coord.x) * 9.f),
|
|
|
|
((g.world.blackhole.pos.y - entity_coord.y) * 9.f),
|
|
|
|
((g.world.blackhole.pos.z - entity_coord.z) * 9.f),
|
|
|
|
0.f,
|
|
|
|
0.f,
|
|
|
|
0.f,
|
|
|
|
0,
|
|
|
|
false,
|
|
|
|
true,
|
|
|
|
true,
|
|
|
|
0,
|
|
|
|
0);
|
2023-02-13 20:38:30 +00:00
|
|
|
}
|
2023-02-08 22:50:26 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
//draw blackhole
|
|
|
|
GRAPHICS::DRAW_MARKER(28,
|
2023-03-01 21:27:15 +00:00
|
|
|
g.world.blackhole.pos.x,
|
|
|
|
g.world.blackhole.pos.y,
|
|
|
|
g.world.blackhole.pos.z,
|
|
|
|
0.f,
|
|
|
|
0.f,
|
|
|
|
0.f,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
15.f,
|
|
|
|
15.f,
|
|
|
|
15.f,
|
|
|
|
g.world.blackhole.color[0] * 255,
|
|
|
|
g.world.blackhole.color[1] * 255,
|
|
|
|
g.world.blackhole.color[2] * 255,
|
|
|
|
g.world.blackhole.alpha,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0,
|
|
|
|
0);
|
2023-02-08 22:50:26 +01:00
|
|
|
}
|
|
|
|
};
|
2023-03-01 21:27:15 +00:00
|
|
|
|
2023-06-06 07:40:40 +00:00
|
|
|
blackhole g_blackhole("blackhole", "Blackhole", "Spawns a blackhole that picks up all the peds and vehicles in your area",
|
2023-03-01 21:27:15 +00:00
|
|
|
g.world.blackhole.enable);
|
2023-06-06 07:40:40 +00:00
|
|
|
bool_command g_blackhole_peds("blackholeincpeds", "Peds", "Includes all nearby peds in the blackhole's path of destruction",
|
2023-03-01 21:27:15 +00:00
|
|
|
g.world.blackhole.include_peds);
|
2023-06-06 07:40:40 +00:00
|
|
|
bool_command g_blackhole_vehicles("blackholeincvehs", "Vehicles", "Includes all nearby vehicles in the blackhole's path of destruction",
|
2023-03-01 21:27:15 +00:00
|
|
|
g.world.blackhole.include_vehicles);
|
2023-02-08 22:50:26 +01:00
|
|
|
}
|