Several feature additions (#889)

* Added Infinite Range
* Added Fill Ammo
* Added Aim Assist
* Added Hud Color Options
* Added Clear Wanted Level
* Added Health Regen
* curly brackets in invisibility
* Added hotkeys
* Improved Increased Damage
This commit is contained in:
TheGreenBandit 2023-03-13 17:10:21 -04:00 committed by GitHub
parent cb23e221b6
commit d87caaa6d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 377 additions and 160 deletions

View File

@ -56,7 +56,6 @@ namespace big
looped::weapons_cage_gun();
looped::weapons_delete_gun();
looped::weapons_gravity_gun();
looped::weapons_increased_damage();
looped::weapons_repair_gun();
looped::weapons_steal_vehicle_gun();
looped::weapons_vehicle_gun();

View File

@ -0,0 +1,22 @@
#include "backend/command.hpp"
#include "natives.hpp"
#include "services/gta_data/gta_data_service.hpp"
namespace big
{
class fill_ammo : command
{
using command::command;
virtual void execute(const std::vector<std::uint64_t>&, const std::shared_ptr<command_context> ctx)
{
for (const auto& [_, weapon] : g_gta_data_service->weapons())
{
int ammo_in;
WEAPON::GET_MAX_AMMO(self::ped, weapon.m_hash, &ammo_in);
WEAPON::SET_PED_AMMO(self::ped, weapon.m_hash, ammo_in, 0);
}
}
};
fill_ammo g_fill_ammo("fillammo", "Fill Ammo", "Fills all of your ammo.", 0);
}

View File

@ -0,0 +1,7 @@
#include "backend/bool_command.hpp"
namespace big
{
bool_command g_beastjump("beastjump", "Beast Jump", "Allows you to jump as if you were the beast like in the Hunt the Beast event",
g.self.beast_jump);
}

View File

@ -0,0 +1,21 @@
#include "backend/command.hpp"
#include "natives.hpp"
namespace big
{
class clear_wanted : command
{
using command::command;
virtual void execute(const std::vector<std::uint64_t>&, const std::shared_ptr<command_context> ctx)
{
if(g_local_player && g_local_player !=nullptr && !g.self.force_wanted_level)
{
g.self.wanted_level = 0;
g_local_player->m_player_info->m_is_wanted = false;
}
}
};
clear_wanted g_clear_wanted("clearwantedlvl", "Clear Wanted Level", "Clears your wanted level", 0);
}

View File

@ -0,0 +1,6 @@
#include "backend/bool_command.hpp"
namespace big
{
bool_command g_super_jump("superjump", "Super Jump", "Jump really high", g.self.super_jump);
}

View File

@ -55,7 +55,6 @@ namespace big
static void custom_gun_disable_control_action();
static void weapons_delete_gun();
static void weapons_gravity_gun();
static void weapons_increased_damage();
static void weapons_repair_gun();
static void weapons_steal_vehicle_gun();
static void weapons_vehicle_gun();

View File

@ -1,23 +0,0 @@
#include "backend/looped_command.hpp"
#include "gta/enums.hpp"
#include "natives.hpp"
namespace big
{
class beast_jump_looped : looped_command
{
using looped_command::looped_command;
virtual void on_tick() override
{
if (PAD::IS_CONTROL_JUST_PRESSED(0, (int)ControllerInputs::INPUT_JUMP) && !PED::IS_PED_IN_ANY_VEHICLE(self::ped, NULL) && !ENTITY::IS_ENTITY_IN_AIR(self::ped))
{
TASK::TASK_JUMP(self::ped, true, true, true);
}
}
};
beast_jump_looped g_beast_jump_looped("beastjump", "Beast Jump", "Allows you to jump as if you were the beast like in the Hunt the Beast event",
g.self.beast_jump);
}

View File

@ -0,0 +1,25 @@
#include "natives.hpp"
#include "backend/looped_command.hpp"
#include "gta/enums.hpp"
namespace big
{
class health_regen_looped : looped_command
{
using looped_command::looped_command;
virtual void on_tick() override
{
PLAYER::SET_PLAYER_HEALTH_RECHARGE_MULTIPLIER(self::ped, g.self.healthregenrate);
PLAYER::SET_PLAYER_HEALTH_RECHARGE_MAX_PERCENT(self::ped, 99999.0f);
};
virtual void on_disable() override
{
PLAYER::SET_PLAYER_HEALTH_RECHARGE_MULTIPLIER(self::ped, 1.0f);
PLAYER::SET_PLAYER_HEALTH_RECHARGE_MAX_PERCENT(self::ped, 1.0f);
}
};
health_regen_looped g_health_regen_looped("healthregen", "Override Health Regen", "Turn on the regen multiplier you have set.", g.self.healthregen);
}

View File

@ -9,11 +9,11 @@ namespace big
void looped::self_hud()
{
const bool bHideRadar = g.self.hide_radar;
const bool bHideAmmo = g.self.hide_ammo;
const bool bForceShowElement = g.self.force_show_hud_element;
const bool bForceShowHUD = g.self.force_show_hud;
auto& bHudComponents = g.self.hud_components_states;
const bool bHideRadar = g.self.hud.hide_radar;
const bool bHideAmmo = g.self.hud.hide_ammo;
const bool bForceShowElement = g.self.hud.force_show_hud_element;
const bool bForceShowHUD = g.self.hud.force_show_hud;
auto& bHudComponents = g.self.hud.hud_components_states;
if (bHideRadar)
{

View File

@ -0,0 +1,33 @@
#include "natives.hpp"
#include "backend/looped_command.hpp"
namespace big
{
class hudcolor_looped : looped_command
{
using looped_command::looped_command;
virtual void on_tick() override
{
if (g.self.hud.shcolor)
{
HUD::REPLACE_HUD_COLOUR_WITH_RGBA(g.self.hud.index, g.self.hud.r, g.self.hud.g, g.self.hud.b, g.self.hud.a);
}
if (g.self.hud.mhcolor)
{
HUD::SET_CUSTOM_MP_HUD_COLOR(g.self.hud.hcolor);
}
if (g.self.hud.mtcolor)
{
HUD::OVERRIDE_MP_TEXT_CHAT_COLOR(0, g.self.hud.tcolor);
}
}
};
hudcolor_looped g_hudcolor_looped("hudcolor", "Hudcolor Overide", "Replaces features of your hud with custom colors you set",
g.self.hud.hudcolor);
bool_command g_shcolor("singlehudcol", "Hud Color", "enables the singlehudcol", g.self.hud.shcolor);
bool_command g_mhcolor("mphudcol", "MP Hud Color", "enables the mphudcol", g.self.hud.mhcolor);
bool_command g_mtcolor("mptextcol", "MP Text Color", "enables the mptextcol", g.self.hud.mtcolor);
}

View File

@ -39,4 +39,4 @@ namespace big
invisibility g_invisibility("invis", "Invisiblity", "Makes you invisible", g.self.invisibility);
bool_command g_local_visibility("localvis", "Visible Locally", "Makes you visible to yourself, but other players would still not be able to see you",
g.self.local_visibility);
}
}

View File

@ -1,30 +0,0 @@
#include "backend/looped_command.hpp"
#include "gta/enums.hpp"
#include "natives.hpp"
namespace big
{
class super_jump_looped : looped_command
{
using looped_command::looped_command;
virtual void on_tick() override
{
if (PAD::IS_CONTROL_JUST_PRESSED(0, (int)ControllerInputs::INPUT_JUMP) && !PED::IS_PED_IN_ANY_VEHICLE(self::ped, NULL) && !ENTITY::IS_ENTITY_IN_AIR(self::ped))
{
ENTITY::APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(self::ped, 0, 0, 10000, 5000, true, true, true, false);
}
if (PED::IS_PED_FALLING(self::ped))
{
TASK::CLEAR_PED_TASKS(self::ped);
}
if (WEAPON::HAS_PED_GOT_WEAPON(self::ped, RAGE_JOAAT("p_parachute_s"), false))
{
WEAPON::SET_CURRENT_PED_WEAPON(self::ped, RAGE_JOAAT("WEAPON_UNARMED"), true);
}
}
};
super_jump_looped g_super_jump_looped("superjump", "Super Jump", "Allows you to jump really high", g.self.super_jump);
}

View File

@ -1,15 +1,48 @@
#include "backend/looped/looped.hpp"
#include "natives.hpp"
#include "backend/looped_command.hpp"
namespace big
{
void looped::weapons_increased_damage()
class increased_damage : looped_command
{
if (g.weapons.increased_damage != 1)
using looped_command::looped_command;
CWeaponInfo* p_modified_weapon = nullptr;
float og_damage = 0.0f;
virtual void on_tick() override
{
Hash weapon{};
WEAPON::GET_CURRENT_PED_WEAPON(self::ped, &weapon, 0);
WEAPON::SET_WEAPON_DAMAGE_MODIFIER(weapon, g.weapons.increased_damage);
if (!g_local_player)
{
return;
}
if (g_local_player->m_weapon_manager)
{
if (p_modified_weapon != g_local_player->m_weapon_manager->m_weapon_info
&& g_local_player->m_weapon_manager->m_weapon_info)
{
if (p_modified_weapon)
p_modified_weapon->m_damage = og_damage;
og_damage = g_local_player->m_weapon_manager->m_weapon_info->m_damage;
p_modified_weapon = g_local_player->m_weapon_manager->m_weapon_info;
g_local_player->m_weapon_manager->m_weapon_info->m_damage = g.weapons.increased_damage;
}
}
}
}
virtual void on_disable() override
{
if (g_local_player && p_modified_weapon)
{
p_modified_weapon->m_damage = og_damage;
p_modified_weapon = nullptr;
}
}
};
increased_damage
g_increased_damage("incrdamage", "Damage Override", "Sets your damage to whatever you want", g.weapons.increase_damage);
}

View File

@ -7,9 +7,6 @@ namespace big
{
using looped_command::looped_command;
CWeaponInfo* p_modified_weapon = nullptr;
float og_recoil_value = 0.0f;
virtual void on_tick() override
{
WEAPON::SET_PED_INFINITE_AMMO(self::ped, TRUE, NULL);
@ -22,4 +19,4 @@ namespace big
};
infinite_ammo g_infinite_ammo("infammo", "Infinite Ammo", "Never run out of ammo again", g.weapons.infinite_ammo);
}
}

View File

@ -0,0 +1,47 @@
#include "natives.hpp"
#include "backend/looped_command.hpp"
namespace big
{
class infinite_range : looped_command
{
using looped_command::looped_command;
CWeaponInfo* p_modified_weapon = nullptr;
float og_range = 0.0f;
virtual void on_tick() override
{
if (!g_local_player)
{
return;
}
if (g_local_player->m_weapon_manager)
{
if (p_modified_weapon != g_local_player->m_weapon_manager->m_weapon_info
&& g_local_player->m_weapon_manager->m_weapon_info)
{
if (p_modified_weapon)
p_modified_weapon->m_weapon_range = og_range;
og_range = g_local_player->m_weapon_manager->m_weapon_info->m_weapon_range;
p_modified_weapon = g_local_player->m_weapon_manager->m_weapon_info;
g_local_player->m_weapon_manager->m_weapon_info->m_weapon_range = 1000.0f;
}
}
}
virtual void on_disable() override
{
if (g_local_player && p_modified_weapon)
{
p_modified_weapon->m_weapon_range = og_range;
p_modified_weapon = nullptr;
}
}
};
infinite_range g_infinite_range("infrange", "Infinite Range", "Kill anything at any distance.", g.weapons.infinite_range);
}

View File

@ -252,48 +252,61 @@ namespace big
NLOHMANN_DEFINE_TYPE_INTRUSIVE(ptfx_effects, show, size)
} ptfx_effects{};
bool clean_player = false;
bool force_wanted_level = false;
bool free_cam = false;
bool invisibility = false;
bool local_visibility = true;
bool never_wanted = false;
bool no_ragdoll = false;
bool noclip = false;
bool off_radar = false;
bool super_run = false;
bool no_collision = false;
bool unlimited_oxygen = false;
bool no_water_collision = false;
int wanted_level = 0;
bool god_mode = false;
bool part_water = false;
bool proof_bullet = false;
bool proof_fire = false;
bool proof_collision = false;
bool proof_melee = false;
bool proof_explosion = false;
bool proof_steam = false;
bool proof_drown = false;
bool proof_water = false;
uint32_t proof_mask = 0;
bool hide_radar = false;
bool hide_ammo = false;
int selected_hud_component = 1;
std::array<bool, 22> hud_components_states = {false};
bool force_show_hud_element = false;
bool force_show_hud = false;
bool mobile_radio = false;
bool fast_respawn = false;
bool auto_tp = false;
bool super_jump = false;
bool beast_jump = false;
bool superman = false;
bool clean_player = false;
bool force_wanted_level = false;
bool free_cam = false;
bool invisibility = false;
bool local_visibility = true;
bool never_wanted = false;
bool no_ragdoll = false;
bool noclip = false;
bool off_radar = false;
bool super_run = false;
bool no_collision = false;
bool unlimited_oxygen = false;
bool no_water_collision = false;
int wanted_level = 0;
bool god_mode = false;
bool part_water = false;
bool proof_bullet = false;
bool proof_fire = false;
bool proof_collision = false;
bool proof_melee = false;
bool proof_explosion = false;
bool proof_steam = false;
bool proof_drown = false;
bool proof_water = false;
uint32_t proof_mask = 0;
bool mobile_radio = false;
bool fast_respawn = false;
bool auto_tp = false;
bool super_jump = false;
bool beast_jump = false;
bool healthregen = false;
float healthregenrate = 1.0f;
bool superman = false;
struct hud
{
bool hudcolor = false;
bool shcolor = false;
bool mtcolor = false;
bool mhcolor = false;
int hcolor = 0;
int tcolor = 0;
int index, r, g, b, a;
bool hide_radar = false;
bool hide_ammo = false;
int selected_hud_component = 1;
std::array<bool, 22> hud_components_states = {false};
bool force_show_hud_element = false;
bool force_show_hud = false;
NLOHMANN_DEFINE_TYPE_INTRUSIVE(hud, hudcolor, shcolor, mtcolor, mhcolor, hcolor, tcolor, index, r, g, b, a, hide_radar, hide_ammo, selected_hud_component, hud_components_states, force_show_hud_element, force_show_hud)
} hud{};
// do not save below entries
bool dance_mode = false;
NLOHMANN_DEFINE_TYPE_INTRUSIVE(self, ptfx_effects, clean_player, force_wanted_level, free_cam, invisibility, local_visibility, never_wanted, no_ragdoll, noclip, off_radar, super_run, no_collision, unlimited_oxygen, no_water_collision, wanted_level, god_mode, part_water, proof_bullet, proof_fire, proof_collision, proof_melee, proof_explosion, proof_steam, proof_drown, proof_water, proof_mask, hide_radar, hide_ammo, selected_hud_component, hud_components_states, force_show_hud_element, force_show_hud, mobile_radio, fast_respawn, auto_tp, super_jump, beast_jump, superman)
NLOHMANN_DEFINE_TYPE_INTRUSIVE(self, ptfx_effects, clean_player, force_wanted_level, free_cam, invisibility, local_visibility, never_wanted, no_ragdoll, noclip, off_radar, super_run, no_collision, unlimited_oxygen, no_water_collision, wanted_level, god_mode, part_water, proof_bullet, proof_fire, proof_collision, proof_melee, proof_explosion, proof_steam, proof_drown, proof_water, proof_mask, mobile_radio, fast_respawn, auto_tp, super_jump, beast_jump, healthregen, healthregenrate, hud, superman)
} self{};
struct session
@ -380,10 +393,11 @@ namespace big
int beastjump = 0;
int invisveh = 0;
int localinvisveh = 0;
int fill_ammo = 0;
int fast_quit = 0;
int cmd_excecutor = 0x55; // U
NLOHMANN_DEFINE_TYPE_INTRUSIVE(hotkeys, editing_menu_toggle, menu_toggle, teleport_waypoint, teleport_objective, noclip, bringvehicle, invis, heal, fill_inventory, skip_cutscene, freecam, superrun, superjump, beastjump, invisveh, localinvisveh, fast_quit, cmd_excecutor)
int cmd_excecutor = 0x55;
NLOHMANN_DEFINE_TYPE_INTRUSIVE(hotkeys, editing_menu_toggle, menu_toggle, teleport_waypoint, teleport_objective, noclip, bringvehicle, invis, heal, fill_inventory, skip_cutscene, freecam, superrun, superjump, beastjump, invisveh, localinvisveh, fill_ammo, fast_quit, cmd_excecutor)
} hotkeys{};
bool dev_dlc = false;
@ -458,7 +472,7 @@ namespace big
int alpha = 150;
rage::fvector3 pos;
NLOHMANN_DEFINE_TYPE_INTRUSIVE(blackhole, enable, include_peds, include_vehicles, color, alpha)
NLOHMANN_DEFINE_TYPE_INTRUSIVE(blackhole, include_peds, include_vehicles, color, alpha)
} blackhole{};
struct nearby
@ -650,6 +664,7 @@ namespace big
bool infinite_ammo = false;
bool infinite_mag = false;
float increased_damage = 1;
bool increase_damage = false;
bool no_recoil = false;
bool no_spread = false;
std::string vehicle_gun_model = "bus";
@ -658,8 +673,9 @@ namespace big
bool rapid_fire = false;
bool interior_weapon = false;
bool triggerbot = false;
bool infinite_range = false;
NLOHMANN_DEFINE_TYPE_INTRUSIVE(weapons, ammo_special, custom_weapon, aimbot, force_crosshairs, infinite_ammo, infinite_mag, increased_damage, no_recoil, no_spread, vehicle_gun_model, increased_c4_limit, increased_flare_limit, rapid_fire, gravity_gun, interior_weapon, triggerbot)
NLOHMANN_DEFINE_TYPE_INTRUSIVE(weapons, ammo_special, custom_weapon, aimbot, force_crosshairs, infinite_ammo, infinite_mag, increased_damage, increase_damage, no_recoil, no_spread, vehicle_gun_model, increased_c4_limit, increased_flare_limit, rapid_fire, gravity_gun, interior_weapon, triggerbot, infinite_range)
} weapons{};
struct window
@ -816,4 +832,4 @@ namespace big
};
inline auto g = menu_settings();
}
}

View File

@ -92,9 +92,9 @@ namespace big::functions
using fipackfile_unmount = bool (*)(const char* mount_point);
using start_get_session_by_gamer_handle = bool (*)(int profile_index, rage::rlGamerHandle* handles, int count, rage::rlSessionByGamerTaskResult* result, int unk, bool* success, rage::rlTaskStatus* state);
using start_matchmaking_find_sessions = bool (*)(int profile_index, int available_slots, NetworkGameFilterMatchmakingComponent* m_filter, unsigned int max_sessions, rage::rlSessionInfo* result_sessions, int* result_session_count, rage::rlTaskStatus* state);
using start_get_presence_attributes = bool (*)(int profile_index, rage::rlScHandle* handle, rage::rlQueryPresenceAttributesContext* contexts, int count, rage::rlTaskStatus* state);
using join_session_by_info = bool (*)(Network* network, rage::rlSessionInfo* info, int unk, int flags, rage::rlGamerHandle* handles, int handlecount);
using start_matchmaking_find_sessions = bool (*)(int profile_index, int available_slots, NetworkGameFilterMatchmakingComponent* m_filter, unsigned int max_sessions, rage::rlSessionInfo* result_sessions, int* result_session_count, rage::rlTaskStatus* state);
using start_get_presence_attributes = bool (*)(int profile_index, rage::rlScHandle* handle, rage::rlQueryPresenceAttributesContext* contexts, int count, rage::rlTaskStatus* state);
using join_session_by_info = bool (*)(Network* network, rage::rlSessionInfo* info, int unk, int flags, rage::rlGamerHandle* handles, int handlecount);
using generate_uuid = bool (*)(std::uint64_t* uuid);
@ -109,10 +109,10 @@ namespace big::functions
using send_chat_message = bool (*)(int64_t* send_chat_ptr, rage::rlGamerInfo* gamer_info, char* message, bool is_team);
using send_network_damage = void (*)(CEntity* source, CEntity* target, rage::fvector3* position, int hit_component, bool override_default_damage, int weapon_type, float override_damage, int tire_index, int suspension_index, int flags, std::uint32_t action_result_hash, std::int16_t action_result_id, int action_unk, bool hit_weapon, bool hit_weapon_ammo_attachment, bool silenced, bool unk, rage::fvector3* impact_direction);
using request_ragdoll = void (*)(uint16_t object_id);
using request_control = void (*)(rage::netObject* net_object);
using request_ragdoll = void (*)(uint16_t object_id);
using request_control = void (*)(rage::netObject* net_object);
using get_connection_peer = rage::netConnectionPeer* (*)(rage::netConnectionManager* manager, int peer_id);
using get_connection_peer = rage::netConnectionPeer* (*)(rage::netConnectionManager* manager, int peer_id);
using send_remove_gamer_cmd = void (*)(rage::netConnectionManager* net_connection_mgr, rage::netConnectionPeer* player, int connection_id, rage::snMsgRemoveGamersFromSessionCmd* cmd, int flags);
using handle_remove_gamer_cmd = void* (*)(rage::snSession* session, rage::snPlayer* origin, rage::snMsgRemoveGamersFromSessionCmd* cmd);
@ -127,8 +127,8 @@ namespace big::functions
using save_json_data = char* (*)(datafile_commands::SveFileObject* object, int* out_length, const char* reason);
using sync_network_time = bool (*)(rage::netConnectionManager* mgr, rage::netConnectionPeer* peer, int connection_id, rage::netTimeSyncMsg* msg, int flags);
using send_packet = bool (*)(rage::netConnectionManager* mgr, rage::netConnectionPeer* peer, int connection_id, void* data, int size, int flags);
using connect_to_peer = bool (*)(rage::netConnectionManager* mgr, rage::rlGamerInfoBase* gamer_info, rage::snConnectToPeerTaskData* data, rage::snConnectToPeerTaskResult* result, rage::rlTaskStatus* status);
using send_packet = bool (*)(rage::netConnectionManager* mgr, rage::netConnectionPeer* peer, int connection_id, void* data, int size, int flags);
using connect_to_peer = bool (*)(rage::netConnectionManager* mgr, rage::rlGamerInfoBase* gamer_info, rage::snConnectToPeerTaskData* data, rage::snConnectToPeerTaskResult* result, rage::rlTaskStatus* status);
using clear_ped_tasks_network = void (*)(CPed* ped, bool immediately);

View File

@ -22,13 +22,13 @@ namespace big
[this] {
dx_on_tick();
},
-5);
-5);
g_renderer->add_wndproc_callback([this](HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
wndproc(hwnd, msg, wparam, lparam);
});
g_renderer->add_dx_callback(esp::draw, 2);// TODO: move to ESP service
g_renderer->add_dx_callback(esp::draw, 2); // TODO: move to ESP service
g_renderer->add_dx_callback(view::context_menu, 1);
dx_init();

View File

@ -114,6 +114,8 @@ namespace big
detour_hook_helper::add<hooks::get_model_info>("GMI", g_pointers->m_get_model_info);
detour_hook_helper::add<hooks::task_jump_constructor>("TJC", g_pointers->m_taskjump_constructor);
detour_hook_helper::add<hooks::enumerate_audio_devices>("EAD", g_pointers->m_enumerate_audio_devices);
detour_hook_helper::add<hooks::direct_sound_capture_create>("DSCC", g_pointers->m_direct_sound_capture_create);

View File

@ -155,6 +155,8 @@ namespace big
static void write_player_creation_data_node(rage::netObject* player, CPlayerCreationDataNode* node);
static void write_player_appearance_data_node(rage::netObject* player, CPlayerAppearanceDataNode* node);
static void task_jump_constructor(std::uint64_t a1, int a2);
static CBaseModelInfo* get_model_info(rage::joaat_t hash, uint32_t* a2);
static int enumerate_audio_devices(CFoundDevice* found_devices, int count, int flags);

View File

@ -0,0 +1,13 @@
#include "hooking.hpp"
namespace big
{
void hooks::task_jump_constructor(std::uint64_t a1, int a2)
{
if (g.self.super_jump)
a2 |= 1 << 15;
if (g.self.beast_jump)
a2 |= (1 << 15) | (1 << 17);
return g_hooking->get_original<task_jump_constructor>()(a1, a2);
}
}

View File

@ -34,7 +34,6 @@ BOOL APIENTRY DllMain(HMODULE hmod, DWORD reason, PVOID)
if (reason == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hmod);
g_hmodule = hmod;
g_main_thread = CreateThread(
nullptr,
@ -149,9 +148,9 @@ BOOL APIENTRY DllMain(HMODULE hmod, DWORD reason, PVOID)
matchmaking_service_instance.reset();
LOG(INFO) << "Matchmaking Service reset.";
player_database_service_instance.reset();
LOG(INFO) << "API Service reset.";
api_service_instance.reset();
LOG(INFO) << "Player Database Service reset.";
api_service_instance.reset();
LOG(INFO) << "API Service reset.";
script_patcher_service_instance.reset();
LOG(INFO) << "Script Patcher Service reset.";
gui_service_instance.reset();

View File

@ -271,9 +271,9 @@ namespace big
// Received clone sync & Get sync tree for type & Get net object for player & Get sync type info & Get net object
main_batch.add("RCS/GSTFT/GNOFP/GNO/GSTI", "4C 8B FA 41 0F B7 D1", [this](memory::handle ptr) {
m_received_clone_sync = ptr.sub(0x1D).as<decltype(m_received_clone_sync)>();
m_get_sync_tree_for_type = ptr.add(0x14).rip().as<decltype(m_get_sync_tree_for_type)>();// 0F B7 CA 83 F9 07 .as()
m_get_net_object = ptr.add(0x76).rip().as<decltype(m_get_net_object)>();// E8 ? ? ? ? 0F B7 53 7C .add(1).rip().as()
m_get_sync_type_info = ptr.add(0x8C).rip().as<decltype(m_get_sync_type_info)>();// 44 0F B7 C1 4C 8D 0D .as()
m_get_sync_tree_for_type = ptr.add(0x14).rip().as<decltype(m_get_sync_tree_for_type)>(); // 0F B7 CA 83 F9 07 .as()
m_get_net_object = ptr.add(0x76).rip().as<decltype(m_get_net_object)>(); // E8 ? ? ? ? 0F B7 53 7C .add(1).rip().as()
m_get_sync_type_info = ptr.add(0x8C).rip().as<decltype(m_get_sync_type_info)>(); // 44 0F B7 C1 4C 8D 0D .as()
});
// Read Bitbuffer Into Sync Tree
@ -471,7 +471,7 @@ namespace big
// Is Matchmaking Session Valid
main_batch.add("IMSV", "48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 41 54 41 55 41 56 41 57 48 83 EC 20 45 0F", [this](memory::handle ptr) {
memory::byte_patch::make(ptr.as<void*>(), std::to_array({0xB0, 0x01, 0xC3}))->apply();// has no observable side effects
memory::byte_patch::make(ptr.as<void*>(), std::to_array({0xB0, 0x01, 0xC3}))->apply(); // has no observable side effects
});
// Send Network Damage
@ -624,8 +624,8 @@ namespace big
// Sound Overload Detour
main_batch.add("SOD", "66 45 3B C1 74 38", [this](memory::handle ptr) {
g_sound_overload_ret_addr = ptr.add(13 + 15).as<decltype(g_sound_overload_ret_addr)>();
std::vector<byte> bytes = {0xFF, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90};// far jump opcode + a nop opcode
g_sound_overload_ret_addr = ptr.add(13 + 15).as<decltype(g_sound_overload_ret_addr)>();
std::vector<byte> bytes = {0xFF, 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90}; // far jump opcode + a nop opcode
*(void**)(bytes.data() + 6) = sound_overload_detour;
memory::byte_patch::make(ptr.add(13).as<void*>(), bytes)->apply();
});
@ -733,7 +733,7 @@ namespace big
// Allow Weapons In Vehicle
main_batch.add("AWIV", "49 3B C9 7C F0 ? ? C3", [this](memory::handle ptr) {
m_allow_weapons_in_vehicle = memory::byte_patch::make(ptr.add(5).as<uint16_t*>(), 0x01B0).get();//In order for the second xref loop not to stop
m_allow_weapons_in_vehicle = memory::byte_patch::make(ptr.add(5).as<uint16_t*>(), 0x01B0).get(); //In order for the second xref loop not to stop
});
// Write Vehicle Proximity Migration Data Node
@ -746,6 +746,11 @@ namespace big
m_migrate_object = ptr.as<functions::migrate_object>();
});
//Task Jump Constructor
main_batch.add("TJC", "48 89 5C 24 ? 89 54 24 10 57 48 83 EC 30 0F 29 74 24", [this](memory::handle ptr) {
m_taskjump_constructor = ptr.as<PVOID>();
});
auto mem_region = memory::module("GTA5.exe");
if (!main_batch.run(mem_region))
{

View File

@ -161,8 +161,8 @@ namespace big
functions::generate_uuid m_generate_uuid{};
std::uint64_t* m_host_token{};
rage::rlGamerInfo* m_profile_gamer_info{}; // per profile gamer info
rage::rlGamerInfo* m_player_info_gamer_info{};// the gamer info that is applied to CPlayerInfo
rage::rlGamerInfo* m_profile_gamer_info{}; // per profile gamer info
rage::rlGamerInfo* m_player_info_gamer_info{}; // the gamer info that is applied to CPlayerInfo
CCommunications** m_communications{};
PVOID m_update_presence_attribute_int;
@ -256,6 +256,8 @@ namespace big
memory::byte_patch* m_disable_collision{};
memory::byte_patch* m_allow_weapons_in_vehicle{};
PVOID m_taskjump_constructor{};
PVOID m_write_vehicle_proximity_migration_data_node{};
functions::migrate_object m_migrate_object{};
};

View File

@ -116,7 +116,7 @@ namespace big
call(thread, gta_util::find_script_program(m_script), args);
delete[] stack;
delete[](uint8_t*) thread;// without the cast it ends up calling the destructor which leads to some pretty funny crashes
delete[] (uint8_t*)thread; // without the cast it ends up calling the destructor which leads to some pretty funny crashes
}
void script_function::operator()(std::initializer_list<std::uint64_t> args)

View File

@ -1,5 +1,4 @@
#include "hotkey_service.hpp"
#include "fiber_pool.hpp"
#include "gui.hpp"
#include "network/ChatData.hpp"
@ -24,9 +23,9 @@ namespace big
register_hotkey("invisveh", g.settings.hotkeys.invisveh, RAGE_JOAAT("invisveh"));
register_hotkey("localinvisveh", g.settings.hotkeys.localinvisveh, RAGE_JOAAT("localinvisveh"));
register_hotkey("fastquit", g.settings.hotkeys.fast_quit, RAGE_JOAAT("fastquit"));
register_hotkey("fillammo", g.settings.hotkeys.fill_ammo, RAGE_JOAAT("fillammo"));
register_hotkey("quicksearch", g.settings.hotkeys.cmd_excecutor, RAGE_JOAAT("cmdexecutor"));
g_renderer->add_wndproc_callback([this](HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam) {
wndproc(static_cast<eKeyState>(msg), wparam);
});

View File

@ -164,7 +164,7 @@ namespace big
ImGui::Text("PLAYER_INFO_LAP_DANCES"_T.data(), stats.LapDancesBought);
ImGui::Text("PLAYER_INFO_MISSIONS_CREATED"_T.data(), stats.MissionsCreated);
ImGui::Text("PLAYER_INFO_METLDOWN_COMPLETE"_T.data(),
scr_globals::gpbd_fm_1.as<GPBD_FM*>()->Entries[id].MeltdownComplete ? "YES"_T.data() : "NO"_T.data()); // curious to see if anyone has actually played singleplayer
scr_globals::gpbd_fm_1.as<GPBD_FM*>()->Entries[id].MeltdownComplete ? "YES"_T.data() : "NO"_T.data()); // curious to see if anyone has actually played singleplayer
ImGui::Separator();

View File

@ -19,6 +19,8 @@ namespace big
components::command_button<"skipcutscene">();
ImGui::SameLine();
components::command_button<"clean">();
ImGui::SameLine();
components::command_button<"fillammo">();
ImGui::Separator();
@ -164,6 +166,8 @@ namespace big
components::sub_title("POLICE"_T);
components::command_button<"clearwantedlvl">();
ImGui::Checkbox("NEVER_WANTED"_T.data(), &g.self.never_wanted);
if (!g.self.never_wanted)
@ -184,50 +188,69 @@ namespace big
ImGui::BeginGroup();
ImGui::Checkbox("HIDE_RADAR"_T.data(), &g.self.hide_radar);
ImGui::Checkbox("HIDE_RADAR"_T.data(), &g.self.hud.hide_radar);
ImGui::SameLine();
ImGui::Checkbox("HIDE_AMMO"_T.data(), &g.self.hide_ammo);
ImGui::Checkbox("HIDE_AMMO"_T.data(), &g.self.hud.hide_ammo);
ImGui::SameLine();
ImGui::Checkbox("FORCE_SHOW_HUD"_T.data(), &g.self.force_show_hud);
ImGui::Checkbox("FORCE_SHOW_HUD"_T.data(), &g.self.hud.force_show_hud);
ImGui::Combo("##hud_comp_combo", &g.self.selected_hud_component, hud_component_names, (int)HudComponents::HUD_WEAPONS);
ImGui::Combo("##hud_comp_combo", &g.self.hud.selected_hud_component, hud_component_names, (int)HudComponents::HUD_WEAPONS);
ImGui::SameLine();
components::button("HIDE"_T, [] {
g.self.hud_components_states[g.self.selected_hud_component] = true;
g.self.hud.hud_components_states[g.self.hud.selected_hud_component] = true;
});
ImGui::SameLine();
components::button("SHOW"_T, [] {
g.self.hud_components_states[g.self.selected_hud_component] = false;
g.self.hud.hud_components_states[g.self.hud.selected_hud_component] = false;
});
components::button("HIDE_ALL"_T, [] {
g.self.hide_radar = true;
g.self.hide_ammo = true;
g.self.hud.hide_radar = true;
g.self.hud.hide_ammo = true;
for (int i = 0; i < (int)HudComponents::HUD_WEAPONS; i++)
{
g.self.hud_components_states[i] = true;
g.self.hud.hud_components_states[i] = true;
}
});
ImGui::SameLine();
components::button("SHOW_ALL"_T, [] {
g.self.hide_radar = false;
g.self.hide_ammo = false;
g.self.hud.hide_radar = false;
g.self.hud.hide_ammo = false;
for (int i = 0; i < (int)HudComponents::HUD_WEAPONS; i++)
{
g.self.hud_components_states[i] = false;
g.self.hud.hud_components_states[i] = false;
}
});
ImGui::SameLine();
ImGui::Checkbox("FORCE_SHOW_HUD_ELEMENT"_T.data(), &g.self.force_show_hud_element);
ImGui::Checkbox("FORCE_SHOW_HUD_ELEMENT"_T.data(), &g.self.hud.force_show_hud_element);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("FORCE_SHOW_HUD_ELEMENT_DESC"_T.data());
ImGui::EndGroup();
components::command_checkbox<"hudcolor">();
ImGui::Checkbox("Override Hud Color Specify", &g.self.hud.shcolor);
ImGui::InputInt("Hud Index", &g.self.hud.index);//need to display current val if not displayed
ImGui::InputInt("Hud Red", &g.self.hud.r);
ImGui::InputInt("Hud Green", &g.self.hud.g);
ImGui::InputInt("Hud Blue", &g.self.hud.b);
ImGui::InputInt("Hud Alpha", &g.self.hud.a);
ImGui::Checkbox("Override Multiplayer Hud Color", &g.self.hud.mhcolor);
ImGui::InputInt("Hud Color", &g.self.hud.hcolor);
ImGui::Checkbox("Override Multiplayer Text Off Index", &g.self.hud.mtcolor);
ImGui::InputInt("Hud Text Color", &g.self.hud.tcolor);
g.self.proof_mask = 0;
if (g.self.god_mode)
{

View File

@ -18,6 +18,7 @@ namespace big
components::command_checkbox<"infammo">();
components::command_checkbox<"infclip">();
components::command_checkbox<"infrange">();
ImGui::Checkbox("Allow Weapons In Interiors", &g.weapons.interior_weapon);
ImGui::EndGroup();
@ -103,7 +104,8 @@ namespace big
}
});
ImGui::SliderFloat("DMG_MULTIPLR"_T.data(), &g.weapons.increased_damage, 1.f, 10.f, "%.1f");
components::command_checkbox<"incrdamage">();
ImGui::InputFloat("Damage", &g.weapons.increased_damage, .1, 10, "%.1f");
ImGui::Separator();

View File

@ -40,6 +40,8 @@ namespace big
g_hotkey_service->update_hotkey("invisveh", g.settings.hotkeys.invisveh);
if (ImGui::Hotkey("Toggle Local Veh Invisibility", &g.settings.hotkeys.localinvisveh))
g_hotkey_service->update_hotkey("localinvisveh", g.settings.hotkeys.localinvisveh);
if (ImGui::Hotkey("Fill Ammo", &g.settings.hotkeys.fill_ammo));
g_hotkey_service->update_hotkey("fillammo", g.settings.hotkeys.fill_ammo);
if (ImGui::Hotkey("Rage Quit (Like Alt + F4)", &g.settings.hotkeys.fast_quit))
g_hotkey_service->update_hotkey("fastquit", g.settings.hotkeys.fast_quit);
if (ImGui::Hotkey("Toggle Command Executor", &g.settings.hotkeys.cmd_excecutor))

View File

@ -68,12 +68,28 @@ namespace big
ImGui::SameLine();
components::button("SAVE_VEHICLE"_T, [] {
save_vehicle(vehicle_file_name_input);
components::button("SAVE_VEHICLE"_T, []
{
if (PED::GET_VEHICLE_PED_IS_IN(self::ped, false) == 0)
{
g_notification_service->push_warning("PERSIST_CAR"_T.data(), "You must be in a vehicle. Please enter a vehicle before using load.");
}
else
{
save_vehicle(vehicle_file_name_input);
}
});
components::button("LOAD_VEHICLE"_T, [] {
load_vehicle(selected_vehicle_file);
components::button("LOAD_VEHICLE"_T, []
{
if (PED::GET_VEHICLE_PED_IS_IN(self::ped, false) != 0)
{
g_notification_service->push_warning("PERSIST_CAR"_T.data(), "You must not be in a vehicle. Please exit your vehicle before using load.");
}
else
{
load_vehicle(selected_vehicle_file);
}
});
ImGui::EndGroup();