feat(PlayerWindow): Added set bounty 10k option

This commit is contained in:
Yimura 2021-01-03 22:13:40 +01:00
parent bedb1bd3a5
commit b5b495b558
No known key found for this signature in database
GPG Key ID: 54EFAD29393A6E78
3 changed files with 52 additions and 0 deletions

View File

@ -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<int*>() = 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<int*>(),
*script_global(1652336).at(10).as<int*>()
};
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);

View File

@ -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);

View File

@ -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()