refactor!: Replace premake5 with CMake. (#551)
Co-authored-by: tupoy-ya <tupoy-ya@users.noreply.github.com>
This commit is contained in:
24
src/views/self/view_mobile.cpp
Normal file
24
src/views/self/view_mobile.cpp
Normal file
@ -0,0 +1,24 @@
|
||||
#include "fiber_pool.hpp"
|
||||
#include "services/mobile/mobile_service.hpp"
|
||||
#include "util/mobile.hpp"
|
||||
#include "views/view.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::mobile() {
|
||||
ImGui::SetWindowSize({ 0.f, (float)*g_pointers->m_resolution_y }, ImGuiCond_Always);
|
||||
|
||||
components::sub_title("Lester");
|
||||
|
||||
ImGui::Checkbox("Off Radar", &g->self.off_radar);
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
components::button("Mors Mutual Fix All Vehicles", [] {
|
||||
int amount_fixed = mobile::mors_mutual::fix_all();
|
||||
g_notification_service->push("Mobile",
|
||||
std::format("{} vehicle{} been fixed.", amount_fixed, amount_fixed == 1 ? " has" : "s have")
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
242
src/views/self/view_self.cpp
Normal file
242
src/views/self/view_self.cpp
Normal file
@ -0,0 +1,242 @@
|
||||
#include "fiber_pool.hpp"
|
||||
#include "util/entity.hpp"
|
||||
#include "util/local_player.hpp"
|
||||
#include "views/view.hpp"
|
||||
#include "core/data/hud_component_names.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::self()
|
||||
{
|
||||
components::button("Suicide", [] {
|
||||
ENTITY::SET_ENTITY_HEALTH(self::ped, 0, 0);
|
||||
});
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("Heal", [] {
|
||||
ENTITY::SET_ENTITY_HEALTH(self::ped, PED::GET_PED_MAX_HEALTH(self::ped), 0);
|
||||
PED::SET_PED_ARMOUR(self::ped, PLAYER::GET_PLAYER_MAX_ARMOUR(self::id));
|
||||
});
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("Fill Inventory", [] {
|
||||
std::string mpPrefix = local_player::get_mp_prefix();
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "NO_BOUGHT_YUM_SNACKS"), 30, true);
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "NO_BOUGHT_HEALTH_SNACKS"), 15, true);
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "NO_BOUGHT_EPIC_SNACKS"), 5, true);
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "MP_CHAR_ARMOUR_1_COUNT"), 10, true);
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "MP_CHAR_ARMOUR_2_COUNT"), 10, true);
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "MP_CHAR_ARMOUR_3_COUNT"), 10, true);
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "MP_CHAR_ARMOUR_4_COUNT"), 10, true);
|
||||
STATS::STAT_SET_INT(rage::joaat(mpPrefix + "MP_CHAR_ARMOUR_5_COUNT"), 10, true);
|
||||
});
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("Skip Cutscene", [] {
|
||||
CUTSCENE::STOP_CUTSCENE_IMMEDIATELY();
|
||||
});
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
components::button("Clean Player", [] {
|
||||
entity::clean_ped(self::ped);
|
||||
});
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
components::sub_title("General");
|
||||
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("God Mode", &g->self.god_mode);
|
||||
ImGui::Checkbox("Off Radar", &g->self.off_radar);
|
||||
ImGui::Checkbox("Free Cam", &g->self.free_cam);
|
||||
ImGui::Checkbox("Disable Phone", &g->tunables.disable_phone);
|
||||
ImGui::Checkbox("Unlimited Oxygen", &g->self.unlimited_oxygen);
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("No Clip", &g->self.noclip);
|
||||
ImGui::Checkbox("No Ragdoll", &g->self.no_ragdoll);
|
||||
ImGui::Checkbox("Super Run", &g->self.super_run);
|
||||
ImGui::Checkbox("No Idle Kick", &g->tunables.no_idle_kick);
|
||||
ImGui::Checkbox("No Water Collision", &g->self.no_water_collision);
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("Invisibility", &g->self.invisibility);
|
||||
if (g->self.invisibility) {
|
||||
ImGui::Checkbox("Locally Visible", &g->self.local_visibility);
|
||||
}
|
||||
|
||||
ImGui::Checkbox("Keep Player Clean", &g->self.clean_player);
|
||||
|
||||
ImGui::Checkbox("No Collision", &g->self.no_collision);
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
components::sub_title("Proofs");
|
||||
|
||||
if (ImGui::Button("Check all"))
|
||||
{
|
||||
g->self.proof_bullet = true;
|
||||
g->self.proof_fire = true;
|
||||
g->self.proof_collision = true;
|
||||
g->self.proof_melee = true;
|
||||
g->self.proof_explosion = true;
|
||||
g->self.proof_steam = true;
|
||||
g->self.proof_drown = true;
|
||||
g->self.proof_water = true;
|
||||
}
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
if (ImGui::Button("Uncheck all"))
|
||||
{
|
||||
g->self.proof_bullet = false;
|
||||
g->self.proof_fire = false;
|
||||
g->self.proof_collision = false;
|
||||
g->self.proof_melee = false;
|
||||
g->self.proof_explosion = false;
|
||||
g->self.proof_steam = false;
|
||||
g->self.proof_drown = false;
|
||||
g->self.proof_water = false;
|
||||
}
|
||||
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("Bullet", &g->self.proof_bullet);
|
||||
ImGui::Checkbox("Fire", &g->self.proof_fire);
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("Collision", &g->self.proof_collision);
|
||||
ImGui::Checkbox("Melee", &g->self.proof_melee);
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("Explosion", &g->self.proof_explosion);
|
||||
ImGui::Checkbox("Steam", &g->self.proof_steam);
|
||||
|
||||
ImGui::EndGroup();
|
||||
ImGui::SameLine();
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("Drown", &g->self.proof_drown);
|
||||
ImGui::Checkbox("Water", &g->self.proof_water);
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
components::sub_title("Police");
|
||||
|
||||
ImGui::Checkbox("Never Wanted", &g->self.never_wanted);
|
||||
|
||||
if (!g->self.never_wanted)
|
||||
{
|
||||
ImGui::Checkbox("Force Wanted Level", &g->self.force_wanted_level);
|
||||
ImGui::Text("Wanted Level");
|
||||
if (
|
||||
ImGui::SliderInt("###wanted_level", &g->self.wanted_level, 0, 5) &&
|
||||
!g->self.force_wanted_level &&
|
||||
g_local_player != nullptr
|
||||
) {
|
||||
g_local_player->m_player_info->m_wanted_level = g->self.wanted_level;
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
components::sub_title("HUD");
|
||||
|
||||
ImGui::BeginGroup();
|
||||
|
||||
ImGui::Checkbox("Hide Radar", &g->self.hide_radar);
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::Checkbox("Hide Ammo", &g->self.hide_ammo);
|
||||
|
||||
ImGui::Combo("##hud_comp_combo", &g->self.selected_hud_component, hud_component_names, (int)HudComponents::HUD_WEAPONS);
|
||||
ImGui::SameLine();
|
||||
components::button("Hide", [] {
|
||||
g->self.hud_components_states[g->self.selected_hud_component] = true;
|
||||
});
|
||||
ImGui::SameLine();
|
||||
components::button("Show", [] {
|
||||
g->self.hud_components_states[g->self.selected_hud_component] = false;
|
||||
});
|
||||
|
||||
components::button("Hide all", [] {
|
||||
g->self.hide_radar = true;
|
||||
g->self.hide_ammo = true;
|
||||
for (int i = 0; i < (int)HudComponents::HUD_WEAPONS; i++)
|
||||
{
|
||||
g->self.hud_components_states[i] = true;
|
||||
}
|
||||
});
|
||||
ImGui::SameLine();
|
||||
components::button("Show all", [] {
|
||||
g->self.hide_radar = false;
|
||||
g->self.hide_ammo = false;
|
||||
for (int i = 0; i < (int)HudComponents::HUD_WEAPONS; i++)
|
||||
{
|
||||
g->self.hud_components_states[i] = false;
|
||||
}
|
||||
});
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
g->self.proof_mask = 0;
|
||||
if (g->self.god_mode)
|
||||
{
|
||||
g->self.proof_mask |= static_cast<int>(eEntityProofs::GOD);
|
||||
}
|
||||
if (g->self.proof_bullet)
|
||||
{
|
||||
g->self.proof_mask |= static_cast<int>(eEntityProofs::BULLET);
|
||||
}
|
||||
if (g->self.proof_fire)
|
||||
{
|
||||
g->self.proof_mask |= static_cast<int>(eEntityProofs::FIRE);
|
||||
}
|
||||
if (g->self.proof_collision)
|
||||
{
|
||||
g->self.proof_mask |= static_cast<int>(eEntityProofs::COLLISION);
|
||||
}
|
||||
if (g->self.proof_melee)
|
||||
{
|
||||
g->self.proof_mask |= static_cast<int>(eEntityProofs::MELEE);
|
||||
}
|
||||
if (g->self.proof_explosion)
|
||||
{
|
||||
g->self.proof_mask |= static_cast<int>(eEntityProofs::EXPLOSION);
|
||||
}
|
||||
if (g->self.proof_steam)
|
||||
{
|
||||
g->self.proof_mask |= static_cast<int>(eEntityProofs::STEAM);
|
||||
}
|
||||
if (g->self.proof_drown)
|
||||
{
|
||||
g->self.proof_mask |= static_cast<int>(eEntityProofs::DROWN);
|
||||
}
|
||||
if (g->self.proof_water)
|
||||
{
|
||||
g->self.proof_mask |= static_cast<int>(eEntityProofs::WATER);
|
||||
}
|
||||
}
|
||||
}
|
50
src/views/self/view_teleport.cpp
Normal file
50
src/views/self/view_teleport.cpp
Normal file
@ -0,0 +1,50 @@
|
||||
#include "views/view.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "util/globals.hpp"
|
||||
#include "util/mobile.hpp"
|
||||
#include "util/teleport.hpp"
|
||||
#include "util/vehicle.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::teleport()
|
||||
{
|
||||
ImGui::Text("Blips:");
|
||||
|
||||
components::button("Waypoint", []
|
||||
{
|
||||
teleport::to_waypoint();
|
||||
});
|
||||
|
||||
components::button("Objective", []
|
||||
{
|
||||
teleport::to_objective();
|
||||
});
|
||||
|
||||
ImGui::Text("Vehicles:");
|
||||
|
||||
components::button("Teleport to Last Vehicle", []
|
||||
{
|
||||
if (g_local_player && g_local_player->m_vehicle)
|
||||
{
|
||||
const Vehicle veh = g_pointers->m_ptr_to_handle(g_local_player->m_vehicle);
|
||||
|
||||
teleport::into_vehicle(veh);
|
||||
}
|
||||
});
|
||||
|
||||
components::button("Bring Personal Vehicle", []
|
||||
{
|
||||
Vehicle veh = mobile::mechanic::get_personal_vehicle();
|
||||
|
||||
vehicle::bring(veh, self::pos);
|
||||
});
|
||||
|
||||
components::button("Teleport to Personal Vehicle", []
|
||||
{
|
||||
Vehicle veh = mobile::mechanic::get_personal_vehicle();
|
||||
|
||||
teleport::into_vehicle(veh);
|
||||
});
|
||||
}
|
||||
}
|
140
src/views/self/view_weapons.cpp
Normal file
140
src/views/self/view_weapons.cpp
Normal file
@ -0,0 +1,140 @@
|
||||
#include "core/data/custom_weapons.hpp"
|
||||
#include "fiber_pool.hpp"
|
||||
#include "natives.hpp"
|
||||
#include "core/data/special_ammo_types.hpp"
|
||||
#include "core/data/bullet_impact_types.hpp"
|
||||
#include "services/gta_data/gta_data_service.hpp"
|
||||
#include "gta/joaat.hpp"
|
||||
#include "views/view.hpp"
|
||||
#include "pointers.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void view::weapons() {
|
||||
components::sub_title("Ammo");
|
||||
ImGui::Checkbox("Infinite Ammo", &g->weapons.infinite_ammo);
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::Checkbox("Infinite Clip", &g->weapons.infinite_mag);
|
||||
|
||||
ImGui::Checkbox("Enable Special Ammo", &g->weapons.ammo_special.toggle);
|
||||
|
||||
if (ImGui::Checkbox("Bypass C4 Limit", &g->weapons.bypass_c4_limit))
|
||||
{
|
||||
*g_pointers->m_bypass_max_count_of_active_sticky_bombs = g->weapons.bypass_c4_limit ? 99 : 4;
|
||||
}
|
||||
|
||||
eAmmoSpecialType selected_ammo = g->weapons.ammo_special.type;
|
||||
eExplosionTag selected_explosion = g->weapons.ammo_special.explosion_tag;
|
||||
|
||||
if (ImGui::BeginCombo("Special Ammo", SPECIAL_AMMOS[(int)selected_ammo].name))
|
||||
{
|
||||
for (const auto& special_ammo : SPECIAL_AMMOS)
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
|
||||
if (ImGui::BeginCombo("Bullet Impact", BULLET_IMPACTS[selected_explosion]))
|
||||
{
|
||||
for (const auto& [type, name] : BULLET_IMPACTS)
|
||||
{
|
||||
if (ImGui::Selectable(name, type == selected_explosion))
|
||||
{
|
||||
g->weapons.ammo_special.explosion_tag = type;
|
||||
}
|
||||
|
||||
if (type == selected_explosion)
|
||||
{
|
||||
ImGui::SetItemDefaultFocus();
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
components::sub_title("Misc");
|
||||
|
||||
ImGui::Checkbox("Force Crosshairs", &g->weapons.force_crosshairs);
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::Checkbox("No Recoil", &g->weapons.no_recoil);
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::Checkbox("No Spread", &g->weapons.no_spread);
|
||||
|
||||
components::button("Get All Weapons", []
|
||||
{
|
||||
for (const auto& [_, weapon] : g_gta_data_service->weapons())
|
||||
{
|
||||
WEAPON::GIVE_DELAYED_WEAPON_TO_PED(self::ped, weapon.m_hash, 9999, false);
|
||||
}
|
||||
|
||||
constexpr auto parachute_hash = RAGE_JOAAT("GADGET_PARACHUTE");
|
||||
WEAPON::GIVE_DELAYED_WEAPON_TO_PED(self::ped, parachute_hash, 0, true);
|
||||
});
|
||||
ImGui::SameLine();
|
||||
components::button("Remove Current Weapon", []
|
||||
{
|
||||
Hash weaponHash;
|
||||
WEAPON::GET_CURRENT_PED_WEAPON(self::ped, &weaponHash, 1);
|
||||
if (weaponHash != RAGE_JOAAT("WEAPON_UNARMED"))
|
||||
{
|
||||
WEAPON::REMOVE_WEAPON_FROM_PED(self::ped, weaponHash);
|
||||
}
|
||||
});
|
||||
|
||||
ImGui::SliderFloat("Damage Multiplier", &g->weapons.increased_damage, 1.f, 10.f, "%.1f");
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
components::sub_title("Custom Weapons");
|
||||
|
||||
CustomWeapon selected = g->weapons.custom_weapon;
|
||||
|
||||
if (ImGui::BeginCombo("Weapon", custom_weapons[(int)selected].name))
|
||||
{
|
||||
for (const custom_weapon& weapon : custom_weapons)
|
||||
{
|
||||
if (ImGui::Selectable(weapon.name, weapon.id == selected))
|
||||
{
|
||||
g->weapons.custom_weapon = weapon.id;
|
||||
}
|
||||
|
||||
if (weapon.id == selected)
|
||||
{
|
||||
ImGui::SetItemDefaultFocus();
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
|
||||
switch (selected)
|
||||
{
|
||||
case CustomWeapon::VEHICLE_GUN:
|
||||
components::input_text_with_hint(
|
||||
"Shooting Model",
|
||||
"Name of the vehicle model",
|
||||
g->weapons.vehicle_gun_model, sizeof(g->weapons.vehicle_gun_model)
|
||||
);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user