2023-03-01 21:27:15 +00:00
|
|
|
#include "core/data/bullet_impact_types.hpp"
|
2022-05-04 19:16:40 +02:00
|
|
|
#include "core/data/custom_weapons.hpp"
|
2023-03-01 21:27:15 +00:00
|
|
|
#include "core/data/special_ammo_types.hpp"
|
2022-05-04 19:16:40 +02:00
|
|
|
#include "fiber_pool.hpp"
|
2023-03-01 21:27:15 +00:00
|
|
|
#include "gta/joaat.hpp"
|
2022-06-30 00:11:54 +02:00
|
|
|
#include "natives.hpp"
|
2023-03-01 21:27:15 +00:00
|
|
|
#include "pointers.hpp"
|
2022-07-29 19:51:19 +08:00
|
|
|
#include "services/gta_data/gta_data_service.hpp"
|
2022-05-04 19:16:40 +02:00
|
|
|
#include "views/view.hpp"
|
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
2023-03-01 21:27:15 +00:00
|
|
|
void view::weapons()
|
|
|
|
{
|
2023-02-01 19:46:33 +01:00
|
|
|
components::sub_title("AMMO"_T);
|
2022-05-04 19:16:40 +02:00
|
|
|
|
2022-11-30 03:16:07 +08:00
|
|
|
ImGui::BeginGroup();
|
2022-05-04 19:16:40 +02:00
|
|
|
|
2022-12-22 21:23:32 +00:00
|
|
|
components::command_checkbox<"infammo">();
|
|
|
|
components::command_checkbox<"infclip">();
|
2023-03-13 17:10:21 -04:00
|
|
|
components::command_checkbox<"infrange">();
|
2023-02-13 20:38:30 +00:00
|
|
|
ImGui::Checkbox("Allow Weapons In Interiors", &g.weapons.interior_weapon);
|
2022-05-04 19:16:40 +02:00
|
|
|
|
2022-11-30 03:16:07 +08:00
|
|
|
ImGui::EndGroup();
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::BeginGroup();
|
2022-05-04 19:16:40 +02:00
|
|
|
|
2023-02-11 05:33:47 +08:00
|
|
|
ImGui::Checkbox("Increased C4 Limit (Max = 50)", &g.weapons.increased_c4_limit);
|
|
|
|
ImGui::Checkbox("Increased Flare Limit (Max = 50)", &g.weapons.increased_flare_limit);
|
|
|
|
|
2022-12-22 21:23:32 +00:00
|
|
|
components::command_checkbox<"rapidfire">();
|
2022-11-30 03:16:07 +08:00
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
ImGui::Checkbox("ENABLE_SPECIAL_AMMO"_T.data(), &g.weapons.ammo_special.toggle);
|
2023-06-10 14:47:19 +02:00
|
|
|
components::options_modal("Special ammo", [] {
|
|
|
|
eAmmoSpecialType selected_ammo = g.weapons.ammo_special.type;
|
|
|
|
eExplosionTag selected_explosion = g.weapons.ammo_special.explosion_tag;
|
2022-10-26 22:10:19 +02:00
|
|
|
|
2023-06-10 14:47:19 +02:00
|
|
|
if (ImGui::BeginCombo("SPECIAL_AMMO"_T.data(), SPECIAL_AMMOS[(int)selected_ammo].name))
|
2022-05-04 19:16:40 +02:00
|
|
|
{
|
2023-06-10 14:47:19 +02:00
|
|
|
for (const auto& special_ammo : SPECIAL_AMMOS)
|
2022-07-29 19:51:19 +08:00
|
|
|
{
|
2023-06-10 14:47:19 +02:00
|
|
|
if (ImGui::Selectable(special_ammo.name, special_ammo.type == selected_ammo))
|
|
|
|
{
|
|
|
|
g.weapons.ammo_special.type = special_ammo.type;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (special_ammo.type == selected_ammo)
|
|
|
|
{
|
|
|
|
ImGui::SetItemDefaultFocus();
|
|
|
|
}
|
2022-07-29 19:51:19 +08:00
|
|
|
}
|
2023-06-10 14:47:19 +02:00
|
|
|
ImGui::EndCombo();
|
2022-05-04 19:16:40 +02:00
|
|
|
}
|
|
|
|
|
2023-06-10 14:47:19 +02:00
|
|
|
if (ImGui::BeginCombo("BULLET_IMPACT"_T.data(), BULLET_IMPACTS[selected_explosion]))
|
2022-07-06 04:55:18 +08:00
|
|
|
{
|
2023-06-10 14:47:19 +02:00
|
|
|
for (const auto& [type, name] : BULLET_IMPACTS)
|
2022-07-29 19:51:19 +08:00
|
|
|
{
|
2023-06-10 14:47:19 +02:00
|
|
|
if (ImGui::Selectable(name, type == selected_explosion))
|
|
|
|
{
|
|
|
|
g.weapons.ammo_special.explosion_tag = type;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (type == selected_explosion)
|
|
|
|
{
|
|
|
|
ImGui::SetItemDefaultFocus();
|
|
|
|
}
|
2022-07-29 19:51:19 +08:00
|
|
|
}
|
2022-07-06 04:55:18 +08:00
|
|
|
|
2023-06-10 14:47:19 +02:00
|
|
|
ImGui::EndCombo();
|
2022-07-06 04:55:18 +08:00
|
|
|
}
|
2023-06-10 14:47:19 +02:00
|
|
|
});
|
2022-07-06 04:55:18 +08:00
|
|
|
|
2023-06-10 14:47:19 +02:00
|
|
|
ImGui::EndGroup();
|
2022-07-06 04:55:18 +08:00
|
|
|
|
2022-05-04 19:16:40 +02:00
|
|
|
ImGui::Separator();
|
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
components::sub_title("MISC"_T);
|
2022-05-04 19:16:40 +02:00
|
|
|
|
2022-12-22 21:23:32 +00:00
|
|
|
components::command_checkbox<"norecoil">();
|
2022-05-04 19:16:40 +02:00
|
|
|
ImGui::SameLine();
|
2022-12-22 21:23:32 +00:00
|
|
|
components::command_checkbox<"nospread">();
|
2022-05-04 19:16:40 +02:00
|
|
|
|
2023-03-01 21:27:15 +00:00
|
|
|
components::button("GET_ALL_WEAPONS"_T, [] {
|
2022-10-19 00:30:32 +02:00
|
|
|
for (const auto& [_, weapon] : g_gta_data_service->weapons())
|
2022-07-29 19:51:19 +08:00
|
|
|
{
|
2022-10-19 00:30:32 +02:00
|
|
|
WEAPON::GIVE_DELAYED_WEAPON_TO_PED(self::ped, weapon.m_hash, 9999, false);
|
2022-05-04 19:16:40 +02:00
|
|
|
}
|
2022-07-29 19:51:19 +08:00
|
|
|
|
|
|
|
constexpr auto parachute_hash = RAGE_JOAAT("GADGET_PARACHUTE");
|
|
|
|
WEAPON::GIVE_DELAYED_WEAPON_TO_PED(self::ped, parachute_hash, 0, true);
|
2022-10-19 00:30:32 +02:00
|
|
|
});
|
2022-05-23 06:38:45 +08:00
|
|
|
ImGui::SameLine();
|
2023-03-01 21:27:15 +00:00
|
|
|
components::button("REMOVE_CUR_WEAPON"_T, [] {
|
2022-05-23 06:38:45 +08:00
|
|
|
Hash weaponHash;
|
|
|
|
WEAPON::GET_CURRENT_PED_WEAPON(self::ped, &weaponHash, 1);
|
2022-07-29 19:51:19 +08:00
|
|
|
if (weaponHash != RAGE_JOAAT("WEAPON_UNARMED"))
|
|
|
|
{
|
2022-05-23 06:38:45 +08:00
|
|
|
WEAPON::REMOVE_WEAPON_FROM_PED(self::ped, weaponHash);
|
|
|
|
}
|
2022-10-19 00:30:32 +02:00
|
|
|
});
|
2022-05-04 19:16:40 +02:00
|
|
|
|
2023-03-13 17:10:21 -04:00
|
|
|
components::command_checkbox<"incrdamage">();
|
|
|
|
ImGui::InputFloat("Damage", &g.weapons.increased_damage, .1, 10, "%.1f");
|
2022-05-04 19:16:40 +02:00
|
|
|
|
|
|
|
ImGui::Separator();
|
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
components::sub_title("CUSTOM_WEAPONS"_T);
|
2022-05-04 19:16:40 +02:00
|
|
|
|
2023-04-15 17:17:43 -04:00
|
|
|
ImGui::Checkbox("Custom Gun only fires when weapon is out", &g.self.custom_weapon_stop);
|
2022-12-18 23:15:52 +01:00
|
|
|
CustomWeapon selected = g.weapons.custom_weapon;
|
2022-05-04 19:16:40 +02:00
|
|
|
|
2023-02-01 19:46:33 +01:00
|
|
|
if (ImGui::BeginCombo("WEAPON"_T.data(), custom_weapons[(int)selected].name))
|
2022-05-04 19:16:40 +02:00
|
|
|
{
|
|
|
|
for (const custom_weapon& weapon : custom_weapons)
|
|
|
|
{
|
|
|
|
if (ImGui::Selectable(weapon.name, weapon.id == selected))
|
|
|
|
{
|
2022-12-18 23:15:52 +01:00
|
|
|
g.weapons.custom_weapon = weapon.id;
|
2022-05-04 19:16:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (weapon.id == selected)
|
2022-07-29 19:51:19 +08:00
|
|
|
{
|
2022-05-04 19:16:40 +02:00
|
|
|
ImGui::SetItemDefaultFocus();
|
2022-07-29 19:51:19 +08:00
|
|
|
}
|
2022-05-04 19:16:40 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
ImGui::EndCombo();
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (selected)
|
|
|
|
{
|
2023-01-16 22:16:06 +01:00
|
|
|
case CustomWeapon::GRAVITY_GUN:
|
2023-03-01 21:27:15 +00:00
|
|
|
ImGui::Checkbox("Launch on release", &g.weapons.gravity_gun.launch_on_release);
|
|
|
|
break;
|
2022-05-04 19:16:40 +02:00
|
|
|
case CustomWeapon::VEHICLE_GUN:
|
2022-12-18 23:15:52 +01:00
|
|
|
// this some ugly ass looking code
|
|
|
|
static char vehicle_gun[12];
|
|
|
|
std::memcpy(vehicle_gun, g.weapons.vehicle_gun_model.c_str(), 12);
|
2023-02-01 19:46:33 +01:00
|
|
|
if (ImGui::InputTextWithHint("SHOOTING_MODEL"_T.data(), "NAME_VEHICLE_MODEL"_T.data(), vehicle_gun, sizeof(vehicle_gun)))
|
2022-12-18 23:15:52 +01:00
|
|
|
{
|
|
|
|
g.weapons.vehicle_gun_model = vehicle_gun;
|
|
|
|
}
|
|
|
|
if (ImGui::IsItemActive())
|
|
|
|
{
|
2023-03-01 21:27:15 +00:00
|
|
|
g_fiber_pool->queue_job([] {
|
2022-12-18 23:15:52 +01:00
|
|
|
PAD::DISABLE_ALL_CONTROL_ACTIONS(0);
|
|
|
|
});
|
|
|
|
}
|
2022-05-04 19:16:40 +02:00
|
|
|
|
|
|
|
break;
|
|
|
|
}
|
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
|
|
|
|
|
|
|
ImGui::Separator();
|
|
|
|
components::sub_title("Aim Assistance");
|
2023-03-01 21:27:15 +00:00
|
|
|
components::command_checkbox<"triggerbot">();
|
|
|
|
ImGui::SameLine();
|
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
|
|
|
components::command_checkbox<"aimbot">();
|
|
|
|
|
2023-03-01 21:27:15 +00:00
|
|
|
if (g.weapons.aimbot.enable)
|
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
|
|
|
components::command_checkbox<"aimatplayer">();
|
|
|
|
ImGui::SameLine();
|
|
|
|
components::command_checkbox<"aimatnpc">();
|
|
|
|
ImGui::SameLine();
|
|
|
|
components::command_checkbox<"aimatpolice">();
|
|
|
|
ImGui::SameLine();
|
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
|
|
|
components::command_checkbox<"aimatenemy">();
|
|
|
|
|
|
|
|
components::command_checkbox<"smoothing">();
|
|
|
|
if (g.weapons.aimbot.smoothing)
|
|
|
|
{
|
|
|
|
ImGui::SameLine();
|
|
|
|
ImGui::PushItemWidth(220);
|
|
|
|
ImGui::SliderFloat("Speed", &g.weapons.aimbot.smoothing_speed, 1.f, 12.f, "%.1f");
|
|
|
|
ImGui::PopItemWidth();
|
|
|
|
}
|
|
|
|
ImGui::PushItemWidth(350);
|
|
|
|
ImGui::SliderFloat("FOV", &g.weapons.aimbot.fov, 1.f, 360.f, "%.0f");
|
2023-06-22 10:39:13 +02:00
|
|
|
ImGui::SliderFloat("Distance", &g.weapons.aimbot.distance, 1.f, 1000.f, "%.0f");
|
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
|
|
|
ImGui::PopItemWidth();
|
|
|
|
}
|
2022-05-04 19:16:40 +02:00
|
|
|
}
|
2022-06-27 15:59:25 +02:00
|
|
|
}
|