mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-09 10:49:28 +08:00
feat: remote clear wanted level and remote never wanted (#93)
This commit is contained in:
parent
1fcfd5e0c6
commit
9503ab4fdb
@ -47,6 +47,7 @@ namespace big
|
|||||||
|
|
||||||
QUEUE_JOB_BEGIN_CLAUSE()
|
QUEUE_JOB_BEGIN_CLAUSE()
|
||||||
{
|
{
|
||||||
|
looped::player_never_wanted();
|
||||||
looped::player_specate();
|
looped::player_specate();
|
||||||
}QUEUE_JOB_END_CLAUSE
|
}QUEUE_JOB_END_CLAUSE
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@ namespace big
|
|||||||
static void tunables_disable_phone();
|
static void tunables_disable_phone();
|
||||||
static void tunables_no_idle_kick();
|
static void tunables_no_idle_kick();
|
||||||
|
|
||||||
|
static void player_never_wanted();
|
||||||
static void player_specate();
|
static void player_specate();
|
||||||
|
|
||||||
static void protections_replay_interface();
|
static void protections_replay_interface();
|
||||||
|
14
BigBaseV2/src/backend/looped/player/player_never_wanted.cpp
Normal file
14
BigBaseV2/src/backend/looped/player/player_never_wanted.cpp
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#include "backend/looped/looped.hpp"
|
||||||
|
#include "services/player_service.hpp"
|
||||||
|
#include "util/toxic.hpp"
|
||||||
|
|
||||||
|
namespace big
|
||||||
|
{
|
||||||
|
void looped::player_never_wanted()
|
||||||
|
{
|
||||||
|
if (g->player.player_never_wanted && g_player_service->get_selected()->is_valid())
|
||||||
|
{
|
||||||
|
toxic::clear_wanted_player(g_player_service->get_selected()->id());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -23,6 +23,7 @@ namespace big
|
|||||||
|
|
||||||
struct player {
|
struct player {
|
||||||
int character_slot = 1;
|
int character_slot = 1;
|
||||||
|
bool player_never_wanted = false;
|
||||||
int set_level = 130;
|
int set_level = 130;
|
||||||
bool spectating = false;
|
bool spectating = false;
|
||||||
};
|
};
|
||||||
|
@ -44,4 +44,16 @@ namespace big::toxic
|
|||||||
|
|
||||||
g_pointers->m_trigger_script_event(1, args, arg_count, -1);
|
g_pointers->m_trigger_script_event(1, args, arg_count, -1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
inline void clear_wanted_player(Player target)
|
||||||
|
{
|
||||||
|
constexpr size_t arg_count = 3;
|
||||||
|
int64_t args[arg_count] = {
|
||||||
|
(int)eRemoteEvent::ClearWantedLevel,
|
||||||
|
0,
|
||||||
|
*script_global(1893548).at(target, 600).at(511).as<int*>()
|
||||||
|
};
|
||||||
|
|
||||||
|
g_pointers->m_trigger_script_event(1, args, arg_count, 1 << target);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -14,6 +14,19 @@ namespace big
|
|||||||
|
|
||||||
ImGui::Text(title.c_str());
|
ImGui::Text(title.c_str());
|
||||||
ImGui::Checkbox("Spectate", &g->player.spectating);
|
ImGui::Checkbox("Spectate", &g->player.spectating);
|
||||||
|
|
||||||
|
if (ImGui::TreeNode("Misc")) {
|
||||||
|
|
||||||
|
components::button("Clear Wanted Level", [] {
|
||||||
|
toxic::clear_wanted_player(g_player_service->get_selected()->id());
|
||||||
|
});
|
||||||
|
|
||||||
|
ImGui::SameLine();
|
||||||
|
|
||||||
|
ImGui::Checkbox("Never Wanted", &g->player.player_never_wanted);
|
||||||
|
|
||||||
|
ImGui::TreePop();
|
||||||
|
}
|
||||||
|
|
||||||
if (g_player_service->get_selected()->is_valid())
|
if (g_player_service->get_selected()->is_valid())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user