Reactions, remote kick and better protections (#807)

* feat(Scripts): Complete GlobalPlayerBD
* feat(Scripts): add GPBD_Kicking
* feat(Scripts): start work on GPBD_FM_3
* feat(Scripts): add more to GPBD_FM_3
* feat(Scripts): complete GPBD_FM_3
* feat(Scripts): start work on GPBD_FM
* feat(Scripts): improve GPBD_FM
* feat(Scripts): complete GPBD_FM
* feat(Reactions): Add reactions
* feat(Protections): Improve protections
* feat(RemoteKick): Add remote kick
* feat(Stats): add KillsOnPlayers and DeathsByPlayers
* fix(Classes): Fix compiler warnings
This commit is contained in:
maybegreat48
2023-01-03 16:48:32 +00:00
committed by GitHub
parent 858b4d6b9f
commit 13ff1be75a
62 changed files with 1039 additions and 882 deletions

View File

@ -1,111 +0,0 @@
#include "views/view.hpp"
namespace big
{
void draw_pair_option(const std::string_view name, decltype(g.notifications.gta_thread_kill)& option)
{
ImGui::Text("%s", name.data());
ImGui::PushID(name.data());
ImGui::Checkbox("Log", &option.log);
ImGui::Checkbox("Notify", &option.notify);
ImGui::PopID();
}
void view::notification_settings()
{
components::sub_title("GTA Threads");
draw_pair_option("Terminate", g.notifications.gta_thread_kill);
draw_pair_option("Start", g.notifications.gta_thread_start);
components::sub_title("Network Player Manager");
ImGui::Text("Player Join");
ImGui::Checkbox("Above Map", &g.notifications.player_join.above_map);
ImGui::Checkbox("Log", &g.notifications.player_join.log);
ImGui::Checkbox("Notify", &g.notifications.player_join.notify);
draw_pair_option("Player Leave", g.notifications.player_leave);
draw_pair_option("Init", g.notifications.network_player_mgr_init);
draw_pair_option("Shutdown", g.notifications.network_player_mgr_shutdown);
components::sub_title("Received Event");
auto& received_event = g.notifications.received_event;
ImGui::BeginGroup();
draw_pair_option("Clear Ped Tasks", received_event.clear_ped_task);
draw_pair_option("Kick Votes Notification", received_event.kick_vote);
draw_pair_option("Detect Modder Events", received_event.modder_detect);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
draw_pair_option("Report Cash Spawn", received_event.report_cash_spawn);
draw_pair_option("Request Control Event", received_event.request_control_event);
draw_pair_option("Vehicle Temp Action", received_event.vehicle_temp_action);
ImGui::EndGroup();
components::sub_title("Script Event Handler");
auto& script_event_handler = g.notifications.script_event_handler;
ImGui::BeginGroup();
draw_pair_option("Bounty", script_event_handler.bounty);
draw_pair_option("CEO Ban", script_event_handler.ceo_ban);
draw_pair_option("CEO Kick", script_event_handler.ceo_kick);
draw_pair_option("CEO Money", script_event_handler.ceo_money);
draw_pair_option("Destroy Personal Vehicle", script_event_handler.personal_vehicle_destroyed);
draw_pair_option("Fake Deposit", script_event_handler.fake_deposit);
draw_pair_option("Force Mission", script_event_handler.force_mission);
draw_pair_option("Force Teleport", script_event_handler.force_teleport);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
draw_pair_option("GTA Banner", script_event_handler.gta_banner);
draw_pair_option("MC Teleport", script_event_handler.mc_teleport);
draw_pair_option("Network Bail", script_event_handler.network_bail);
draw_pair_option("Remote Off Radar", script_event_handler.remote_off_radar);
draw_pair_option("Rotate Cam", script_event_handler.rotate_cam);
draw_pair_option("Send to Cutscene", script_event_handler.send_to_cutscene);
draw_pair_option("Send to Location", script_event_handler.send_to_location);
draw_pair_option("Sound Spam", script_event_handler.sound_spam);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
draw_pair_option("Spectate", script_event_handler.spectate);
draw_pair_option("Transaction Error", script_event_handler.transaction_error);
draw_pair_option("TSE Crash", script_event_handler.crash);
draw_pair_option("TSE Freeze", script_event_handler.tse_freeze);
draw_pair_option("TSE Sender Mismatch", script_event_handler.tse_sender_mismatch);
draw_pair_option("Vehicle Kick", script_event_handler.vehicle_kick);
draw_pair_option("Wanted Level", script_event_handler.clear_wanted_level);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
draw_pair_option("Teleport To Warehouse", script_event_handler.teleport_to_warehouse);
draw_pair_option("Start Activity", script_event_handler.start_activity);
draw_pair_option("Null Function Kick", script_event_handler.null_function_kick);
draw_pair_option("Send SMS", script_event_handler.send_sms);
ImGui::EndGroup();
components::sub_title("Other");
draw_pair_option("Reports", g.notifications.reports);
draw_pair_option("Transaction Error / Rate Limit", g.notifications.transaction_rate_limit);
draw_pair_option("Mismatch sync type", g.notifications.mismatch_sync_type);
draw_pair_option("Out of allowed range sync type", g.notifications.out_of_allowed_range_sync_type);
draw_pair_option("Invalid sync", g.notifications.invalid_sync);
}
}

View File

@ -6,24 +6,12 @@ namespace big
{
ImGui::BeginGroup();
ImGui::Checkbox("Bounty", &g.protections.script_events.bounty);
ImGui::Checkbox("CEO Ban", &g.protections.script_events.ceo_ban);
ImGui::Checkbox("CEO Kick", &g.protections.script_events.ceo_kick);
ImGui::Checkbox("CEO Money", &g.protections.script_events.ceo_money);
ImGui::Checkbox("TSE Crash", &g.protections.script_events.crash);
ImGui::Checkbox("Fake Deposit", &g.protections.script_events.fake_deposit);
ImGui::Checkbox("Force Mission", &g.protections.script_events.force_mission);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
ImGui::Checkbox("Force Teleport", &g.protections.script_events.force_teleport);
ImGui::Checkbox("GTA Banner", &g.protections.script_events.gta_banner);
ImGui::Checkbox("MC Teleport", &g.protections.script_events.mc_teleport);
ImGui::Checkbox("Network Bail", &g.protections.script_events.network_bail);
ImGui::Checkbox("Personal Vehicle Destroyed", &g.protections.script_events.personal_vehicle_destroyed);
ImGui::Checkbox("Remote Off Radar", &g.protections.script_events.remote_off_radar);
ImGui::Checkbox("Rotate Cam", &g.protections.script_events.rotate_cam);
ImGui::EndGroup();
ImGui::SameLine();
@ -32,20 +20,25 @@ namespace big
ImGui::Checkbox("Send to Cutscene", &g.protections.script_events.send_to_cutscene);
ImGui::Checkbox("Send to Location", &g.protections.script_events.send_to_location);
ImGui::Checkbox("Sound Spam", &g.protections.script_events.sound_spam);
ImGui::Checkbox("Spectate", &g.protections.script_events.spectate);
ImGui::Checkbox("Transaction Error", &g.protections.script_events.transaction_error);
ImGui::Checkbox("Vehicle Kick", &g.protections.script_events.vehicle_kick);
ImGui::Checkbox("Wanted Level", &g.protections.script_events.clear_wanted_level);
ImGui::Checkbox("Personal Vehicle Destroyed", &g.protections.script_events.personal_vehicle_destroyed);
ImGui::Checkbox("Remote Off Radar", &g.protections.script_events.remote_off_radar);
ImGui::Checkbox("Rotate Cam", &g.protections.script_events.rotate_cam);
ImGui::Checkbox("Teleport To Warehouse", &g.protections.script_events.teleport_to_warehouse);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
ImGui::Checkbox("Teleport To Warehouse", &g.protections.script_events.teleport_to_warehouse);
ImGui::Checkbox("Start Activity", &g.protections.script_events.start_activity);
ImGui::Checkbox("Send SMS", &g.protections.script_events.send_sms);
components::script_patch_checkbox("Script Host Kick", &g.protections.script_host_kick);
ImGui::Checkbox("Spectate", &g.protections.script_events.spectate);
ImGui::Checkbox("Vehicle Kick", &g.protections.script_events.vehicle_kick);
ImGui::Checkbox("Wanted Level", &g.protections.script_events.clear_wanted_level);
ImGui::Checkbox("Desync Kick", &g.protections.desync_kick);
ImGui::EndGroup();
ImGui::SameLine();
ImGui::BeginGroup();
ImGui::Checkbox("RID Join", &g.protections.rid_join);
if (ImGui::IsItemHovered())
ImGui::SetTooltip("This will block anyone trying to join, kick or crash you with your Rockstar ID, including your friends");

View File

@ -0,0 +1,126 @@
#include "views/view.hpp"
namespace big
{
void draw_pair_option(const std::string_view name, decltype(g.notifications.gta_thread_kill)& option)
{
ImGui::Text("%s", name.data());
ImGui::PushID(name.data());
ImGui::Checkbox("Log", &option.log);
ImGui::Checkbox("Notify", &option.notify);
ImGui::PopID();
}
void draw_reaction(reaction& reaction)
{
if (ImGui::TreeNode(reaction.m_event_name))
{
ImGui::Checkbox("Announce In Chat", &reaction.announce_in_chat);
ImGui::Checkbox("Notify", &reaction.notify);
ImGui::Checkbox("Log", &reaction.log);
ImGui::Checkbox("Add Player To Database", &reaction.add_to_player_db);
if (reaction.add_to_player_db)
ImGui::Checkbox("Block Joins", &reaction.block_joins);
ImGui::Checkbox("Kick Player", &reaction.kick);
ImGui::TreePop();
}
}
// TODO code duplication
void draw_interloper_reaction(interloper_reaction& reaction)
{
if (ImGui::TreeNode(reaction.m_event_name))
{
ImGui::Checkbox("Announce In Chat", &reaction.announce_in_chat);
ImGui::Checkbox("Notify", &reaction.notify);
ImGui::Checkbox("Log", &reaction.log);
ImGui::Checkbox("Add Attacker To Database", &reaction.add_to_player_db);
if (reaction.add_to_player_db)
ImGui::Checkbox("Block Joins", &reaction.block_joins);
ImGui::Checkbox("Kick Attacker", &reaction.kick);
if (reaction.m_blockable || reaction.m_karmaable)
ImGui::Separator();
if (reaction.m_blockable)
ImGui::Checkbox("Block", &reaction.block);
if (reaction.m_karmaable)
ImGui::Checkbox("Karma", &reaction.karma);
ImGui::TreePop();
}
}
void view::reaction_settings()
{
components::title("Reactions");
draw_reaction(g.reactions.bounty);
draw_reaction(g.reactions.ceo_money);
draw_reaction(g.reactions.clear_wanted_level);
draw_reaction(g.reactions.crash);
draw_reaction(g.reactions.destroy_personal_vehicle);
draw_reaction(g.reactions.fake_deposit);
draw_reaction(g.reactions.force_mission);
draw_reaction(g.reactions.force_teleport);
draw_reaction(g.reactions.give_collectible);
draw_reaction(g.reactions.gta_banner);
draw_reaction(g.reactions.mc_teleport);
draw_reaction(g.reactions.network_bail);
draw_reaction(g.reactions.null_function_kick);
draw_reaction(g.reactions.personal_vehicle_destroyed);
draw_reaction(g.reactions.remote_off_radar);
draw_reaction(g.reactions.rotate_cam);
draw_reaction(g.reactions.send_to_cutscene);
draw_reaction(g.reactions.send_to_location);
draw_reaction(g.reactions.sound_spam);
draw_reaction(g.reactions.spectate_notification);
draw_reaction(g.reactions.start_activity);
draw_reaction(g.reactions.teleport_to_warehouse);
draw_reaction(g.reactions.transaction_error);
draw_reaction(g.reactions.tse_freeze);
draw_reaction(g.reactions.tse_sender_mismatch);
draw_reaction(g.reactions.vehicle_kick);
ImGui::Separator();
draw_reaction(g.reactions.clear_ped_tasks);
draw_reaction(g.reactions.remote_ragdoll);
draw_reaction(g.reactions.kick_vote);
draw_reaction(g.reactions.modder_detection);
draw_reaction(g.reactions.report);
draw_reaction(g.reactions.report_cash_spawn);
draw_reaction(g.reactions.request_control_event);
ImGui::Separator();
draw_reaction(g.reactions.lost_connection_kick);
draw_reaction(g.reactions.gamer_instruction_kick);
draw_interloper_reaction(g.reactions.lost_connection_kick_others);
draw_interloper_reaction(g.reactions.breakup_others);
components::title("Notifications");
components::sub_title("GTA Threads");
draw_pair_option("Terminate", g.notifications.gta_thread_kill);
draw_pair_option("Start", g.notifications.gta_thread_start);
components::sub_title("Network Player Manager");
ImGui::Text("Player Join");
ImGui::Checkbox("Above Map", &g.notifications.player_join.above_map);
ImGui::Checkbox("Log", &g.notifications.player_join.log);
ImGui::Checkbox("Notify", &g.notifications.player_join.notify);
draw_pair_option("Player Leave", g.notifications.player_leave);
draw_pair_option("Init", g.notifications.network_player_mgr_init);
draw_pair_option("Shutdown", g.notifications.network_player_mgr_shutdown);
components::sub_title("Other");
draw_pair_option("Transaction Error / Rate Limit", g.notifications.transaction_rate_limit);
draw_pair_option("Mismatch sync type", g.notifications.mismatch_sync_type);
draw_pair_option("Out of allowed range sync type", g.notifications.out_of_allowed_range_sync_type);
draw_pair_option("Invalid sync", g.notifications.invalid_sync);
}
}