From 36582c92823cbc6371e846506ce3363d8d8a6ea7 Mon Sep 17 00:00:00 2001 From: Yimura Date: Sun, 3 Jan 2021 22:13:40 +0100 Subject: [PATCH] feat(PlayerWindow): Added set bounty 10k option --- BigBaseV2/src/features/functions.cpp | 40 ++++++++++++++++++++++++++++ BigBaseV2/src/features/functions.hpp | 1 + BigBaseV2/src/gui/player_window.cpp | 11 ++++++++ 3 files changed, 52 insertions(+) diff --git a/BigBaseV2/src/features/functions.cpp b/BigBaseV2/src/features/functions.cpp index 99d06315..1a7eb122 100644 --- a/BigBaseV2/src/features/functions.cpp +++ b/BigBaseV2/src/features/functions.cpp @@ -1,5 +1,7 @@ #include "functions.hpp" +#include "gta/enums.hpp" #include "gta/levels.hpp" +#include "pointers.hpp" #include "script_global.hpp" namespace big::features::functions @@ -39,6 +41,44 @@ namespace big::features::functions *script_global(99007).at(970).as() = value; } + void set_player_bounty(Player player, bool anonymous) + { + int64_t args[22] = + { + RemoteEvents::Bounty, // Hash + 0, + player, // Player + 1, + 10000, // Bounty + 0, + anonymous, // Anonymous (caused by NPC or Lester) + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + *script_global(1652336).at(9).as(), + *script_global(1652336).at(10).as() + }; + + for (uint8_t i = 0; i < 32; i++) + { + args[1] = i; + + g_pointers->m_trigger_script_event(true, args, 22, 1 << i); + + script::get_current()->yield(); + } + } + void set_player_level(int level) { get_active_character_slot(&g_temp.character_slot); diff --git a/BigBaseV2/src/features/functions.hpp b/BigBaseV2/src/features/functions.hpp index 9a8f5a9b..3c34a8ba 100644 --- a/BigBaseV2/src/features/functions.hpp +++ b/BigBaseV2/src/features/functions.hpp @@ -8,6 +8,7 @@ namespace big::features::functions void join_session_type(session_type session); void reset_vehicle_sell_stats(); void set_car_sell_value(int value); + void set_player_bounty(Player player, bool anonymous = false); void set_player_level(int level); void spoof_rank(int rank); void toggle_protections(bool toggle); diff --git a/BigBaseV2/src/gui/player_window.cpp b/BigBaseV2/src/gui/player_window.cpp index a086b341..24efecd5 100644 --- a/BigBaseV2/src/gui/player_window.cpp +++ b/BigBaseV2/src/gui/player_window.cpp @@ -25,6 +25,17 @@ namespace big ImGui::Separator(); + + if (ImGui::Button("Bounty 10k")) + { + QUEUE_JOB_BEGIN_CLAUSE() + { + features::functions::set_player_bounty(g_selectedPlayer.id); + }QUEUE_JOB_END_CLAUSE + } + + ImGui::Separator(); + if (ImGui::Button("Teleport to Player")) { QUEUE_JOB_BEGIN_CLAUSE()