feat(Features/Pointers/PlayerWindow): Added spectate player function
This commit is contained in:
parent
619611a9f5
commit
0b312ecd1c
@ -35,6 +35,7 @@ namespace big
|
||||
void off_radar();
|
||||
void population_modifiers();
|
||||
void reveal_players();
|
||||
void spectate_player();
|
||||
void speedo_meter();
|
||||
void spoof_rank();
|
||||
void sticky_tyres();
|
||||
|
19
BigBaseV2/src/features/looped/spectate_player.cpp
Normal file
19
BigBaseV2/src/features/looped/spectate_player.cpp
Normal file
@ -0,0 +1,19 @@
|
||||
#include "features.hpp"
|
||||
#include "pointers.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
void features::spectate_player()
|
||||
{
|
||||
if (g_selectedPlayer == -1 || !g_players[g_selectedPlayer].is_online || !g_temp.spectate_player)
|
||||
{
|
||||
if (g_temp.spectate_player) g_temp.spectate_player = false;
|
||||
|
||||
g_pointers->m_spectate_player(false, -1);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
g_pointers->m_spectate_player(true, PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g_selectedPlayer));
|
||||
}
|
||||
}
|
@ -14,6 +14,7 @@ namespace big::functions
|
||||
using get_player_name = char*(Player player);
|
||||
using script_event_handler = bool(void* events, CNetGamePlayer* sourcePlayer, CNetGamePlayer* targetPlayer);
|
||||
using set_session_weather = void(char a1, int a2, int a3, int64_t a4);
|
||||
using spectate_player = bool(bool toggle, Ped player);
|
||||
using sync_local_time = void(int h, int m);
|
||||
using trigger_script_event = int(bool unk0, uint64_t* args, int argCount, int bitFlags);
|
||||
}
|
||||
|
@ -29,6 +29,11 @@ namespace big
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::Checkbox("Spectate Player", &g_temp.spectate_player))
|
||||
;
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (ImGui::Button("Teleport to Player"))
|
||||
{
|
||||
QUEUE_JOB_BEGIN_CLAUSE()
|
||||
|
@ -107,6 +107,11 @@ namespace big
|
||||
{
|
||||
m_trigger_script_event = ptr.as<decltype(m_trigger_script_event)>();
|
||||
});
|
||||
|
||||
main_batch.add("Spectate Player", "48 89 5C 24 ? 57 48 83 EC 20 41 8A F8 84 C9", [this](memory::handle ptr)
|
||||
{
|
||||
m_spectate_player = ptr.as<decltype(m_spectate_player)>();
|
||||
});
|
||||
|
||||
main_batch.run(memory::module(nullptr));
|
||||
|
||||
|
@ -40,6 +40,7 @@ namespace big
|
||||
functions::increment_stat_event* m_increment_stat_event{};
|
||||
functions::script_event_handler* m_script_event_handler{};
|
||||
functions::set_session_weather* m_set_session_weather{};
|
||||
functions::spectate_player* m_spectate_player{};
|
||||
functions::sync_local_time* m_sync_local_time{};
|
||||
functions::trigger_script_event* m_trigger_script_event{};
|
||||
};
|
||||
|
@ -14,8 +14,9 @@ namespace big
|
||||
int set_level = 0;
|
||||
int spoofed_rank = 0;
|
||||
game_time time = game_time{};
|
||||
int wanted_level = 0;
|
||||
bool spectate_player = false;
|
||||
int teleport_location = 0;
|
||||
int wanted_level = 0;
|
||||
int weather_type = 0;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user