2023-03-01 21:27:15 +00:00
|
|
|
#include "backend/looped_command.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 "gta/enums.hpp"
|
|
|
|
#include "natives.hpp"
|
|
|
|
#include "util/entity.hpp"
|
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
|
|
|
class aimbot : looped_command
|
|
|
|
{
|
|
|
|
using looped_command::looped_command;
|
|
|
|
|
|
|
|
Vector3 aim_lock;
|
|
|
|
Vector2 mouse_movement;
|
|
|
|
|
|
|
|
virtual void on_tick() override
|
|
|
|
{
|
|
|
|
float local_fov_change = g.weapons.aimbot.fov;
|
|
|
|
for (auto ped : entity::get_entities(false, true))
|
|
|
|
{
|
2023-03-01 21:27:15 +00:00
|
|
|
if (ENTITY::HAS_ENTITY_CLEAR_LOS_TO_ENTITY(self::ped, ped, 17) && !ENTITY::IS_ENTITY_DEAD(ped, 0))// Tracetype is always 17. LOS check
|
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
|
|
|
{
|
2023-03-01 21:27:15 +00:00
|
|
|
int relation = PED::GET_RELATIONSHIP_BETWEEN_PEDS(ped, self::ped);// relation for enemy check
|
|
|
|
int type = PED::GET_PED_TYPE(ped);// for police check, cop types are 6, swat is 27
|
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
|
|
|
Vector3 world_position = ENTITY::GET_ENTITY_COORDS(ped, false);
|
|
|
|
|
2023-03-01 21:27:15 +00:00
|
|
|
if (SYSTEM::VDIST(self::pos.x,
|
|
|
|
self::pos.y,
|
|
|
|
self::pos.z,
|
|
|
|
world_position.x,
|
|
|
|
world_position.y,
|
|
|
|
world_position.z)
|
|
|
|
> g.weapons.aimbot.distance)
|
|
|
|
continue;// If the entity is further than our preset distance then just skip it
|
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
|
|
|
|
2023-03-01 21:27:15 +00:00
|
|
|
if (PED::IS_PED_A_PLAYER(ped) && g.weapons.aimbot.on_player)// check if its a player
|
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
|
|
|
{
|
|
|
|
goto aimbot_handler;
|
|
|
|
}
|
2023-03-01 21:27:15 +00:00
|
|
|
else if (((relation == 4) || (relation == 5)) && g.weapons.aimbot.on_enemy)// relation 4 and 5 are for enemies
|
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
|
|
|
{
|
|
|
|
goto aimbot_handler;
|
|
|
|
}
|
2023-03-01 21:27:15 +00:00
|
|
|
else if (((type == 6 && !PED::IS_PED_MODEL(ped, rage::joaat("s_m_y_uscg_01"))) || type == 27 ||// s_m_y_uscg_01 = us coast guard 1 (techniaclly military)
|
|
|
|
PED::IS_PED_MODEL(ped, rage::joaat("s_m_y_ranger_01")) || PED::IS_PED_MODEL(ped, rage::joaat("s_f_y_ranger_01")))// ranger models
|
|
|
|
&& g.weapons.aimbot.on_police)
|
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
|
|
|
{
|
|
|
|
goto aimbot_handler;
|
|
|
|
}
|
|
|
|
else if (g.weapons.aimbot.on_npc && !PED::IS_PED_A_PLAYER(ped))
|
|
|
|
|
2023-03-01 21:27:15 +00:00
|
|
|
// Update aim lock coords
|
|
|
|
aimbot_handler:
|
|
|
|
{// Jump to here to handle instead of continue statements
|
|
|
|
aim_lock =
|
|
|
|
ENTITY::GET_WORLD_POSITION_OF_ENTITY_BONE(ped, PED::GET_PED_BONE_INDEX(ped, g.weapons.aimbot.selected_bone));
|
|
|
|
if ((aim_lock.x != 0) && (aim_lock.y != 0) && (aim_lock.z != 0))// Ensure none of the coords are = to 0
|
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
|
|
|
{
|
|
|
|
Vector2 screen_dim, movement;
|
2023-03-01 21:27:15 +00:00
|
|
|
GRAPHICS::GET_SCREEN_COORD_FROM_WORLD_COORD(aim_lock.x,
|
|
|
|
aim_lock.y,
|
|
|
|
aim_lock.z,
|
|
|
|
&screen_dim.x,
|
|
|
|
&screen_dim.y);
|
|
|
|
if ((screen_dim.x >= 0) && (screen_dim.y >= 0))// Make sure updated screen dim is greater than 0
|
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
|
|
|
{
|
|
|
|
auto& io = ImGui::GetIO();
|
2023-03-01 21:27:15 +00:00
|
|
|
ImVec2 center(io.DisplaySize.x / 2.f, io.DisplaySize.y / 2.f);// Use ImGui to get the display size
|
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
|
|
|
//Screen dim is a float between 0-1, multiply the float by screen coords
|
|
|
|
screen_dim.x *= io.DisplaySize.x;
|
|
|
|
screen_dim.y *= io.DisplaySize.y;
|
|
|
|
|
2023-03-01 21:27:15 +00:00
|
|
|
if (screen_dim.x > center.x)//If the location is greater than the center (right side)
|
|
|
|
{// Get the amount of distance we need to move, so center of the screen - our location
|
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
|
|
|
movement.x = -(center.x - screen_dim.x);
|
2023-03-01 21:27:15 +00:00
|
|
|
if (movement.x + center.x > center.x * 2)
|
|
|
|
movement.x = 0;
|
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
|
|
|
}
|
|
|
|
else
|
2023-03-01 21:27:15 +00:00
|
|
|
{// if the location is on the left side
|
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
|
|
|
movement.x = screen_dim.x - center.x;
|
2023-03-01 21:27:15 +00:00
|
|
|
if (movement.x + center.x < 0)
|
|
|
|
movement.x = 0;
|
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
|
|
|
}
|
|
|
|
|
|
|
|
// Same thing here but for y, so switch right with up and left with down
|
|
|
|
if (screen_dim.y > center.y)
|
|
|
|
{
|
|
|
|
movement.y = -(center.y - screen_dim.y);
|
2023-03-01 21:27:15 +00:00
|
|
|
if (movement.y + center.y > center.y * 2)
|
|
|
|
movement.x = 0;
|
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
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
movement.y = screen_dim.y - center.y;
|
2023-03-01 21:27:15 +00:00
|
|
|
if (movement.y + center.y < 0)
|
|
|
|
movement.y = 0;
|
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
|
|
|
}
|
|
|
|
|
|
|
|
if (sqrt(pow(movement.x, 2) + pow(movement.y, 2)) < local_fov_change)
|
2023-03-01 21:27:15 +00:00
|
|
|
{// sqrt of movment x and y ^ 2, handles fov math
|
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
|
|
|
local_fov_change = sqrt(pow(movement.x, 2) + pow(movement.y, 2));
|
|
|
|
mouse_movement.x = movement.x;
|
|
|
|
mouse_movement.y = movement.y;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (PAD::GET_DISABLED_CONTROL_NORMAL(0, (int)ControllerInputs::INPUT_AIM))
|
|
|
|
{
|
2023-03-01 21:27:15 +00:00
|
|
|
static bool update_time_now = true;
|
|
|
|
static std::chrono::system_clock::time_point current_time;
|
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
|
|
|
|
|
|
|
if (update_time_now)
|
|
|
|
{
|
2023-03-01 21:27:15 +00:00
|
|
|
current_time = std::chrono::system_clock::now();
|
|
|
|
update_time_now = false;//lockout
|
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
|
|
|
}
|
|
|
|
|
|
|
|
std::chrono::duration<double> elapsed_time = std::chrono::system_clock::now() - current_time;
|
|
|
|
if (elapsed_time.count() > 0.f)
|
|
|
|
{
|
2023-03-01 21:27:15 +00:00
|
|
|
INPUT mouse_handle;// MOUSEINPUT mi;
|
|
|
|
mouse_handle.type = INPUT_MOUSE;
|
|
|
|
mouse_handle.mi.dwFlags = MOUSEEVENTF_MOVE;// Type = Mouse movement, and the event is emulating the mouse movement
|
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
|
|
|
|
2023-03-01 21:27:15 +00:00
|
|
|
// Update the mouse by moving it with how much we need / smoothing speed
|
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
|
|
|
mouse_handle.mi.dx = mouse_movement.x / (g.weapons.aimbot.smoothing ? g.weapons.aimbot.smoothing_speed : 2);
|
|
|
|
mouse_handle.mi.dy = mouse_movement.y / (g.weapons.aimbot.smoothing ? g.weapons.aimbot.smoothing_speed : 2);
|
2023-03-01 21:27:15 +00:00
|
|
|
SendInput(1, &mouse_handle, sizeof(mouse_handle));//handles the input
|
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
|
|
|
|
|
|
|
//Reset our variables
|
|
|
|
mouse_movement.x = 0, mouse_movement.y = 0;
|
2023-03-01 21:27:15 +00:00
|
|
|
update_time_now = true;//reset our time
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
aimbot g_aimbot("aimbot", "Aimbot", "lock on and kill", g.weapons.aimbot.enable);
|
|
|
|
bool_command g_smoothing("smoothing", "Smoothing", "Controls the snappiness of your lock on", g.weapons.aimbot.smoothing);
|
|
|
|
bool_command g_aimbot_on_player("aimatplayer", "Player", "If you suck at pvp this is for you.", g.weapons.aimbot.on_player);
|
|
|
|
bool_command g_aimbot_on_npc("aimatnpc", "NPC", "Generally kills normal NPCs", g.weapons.aimbot.on_npc);
|
|
|
|
bool_command g_aimbot_on_police("aimatpolice", "Police", "Locks onto cops to kill", g.weapons.aimbot.on_police);
|
2023-03-01 21:27:15 +00:00
|
|
|
bool_command
|
|
|
|
g_aimbot_on_enemy("aimatenemy", "Enemy", "Eliminate your enemies, and win your missions", g.weapons.aimbot.on_enemy);
|
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
|
|
|
}
|