2021-05-26 13:33:26 +02:00
|
|
|
#include "backend/looped/looped.hpp"
|
|
|
|
#include "pointers.hpp"
|
|
|
|
#include "natives.hpp"
|
|
|
|
|
|
|
|
namespace big
|
|
|
|
{
|
2021-07-23 23:02:26 +02:00
|
|
|
static bool bReset = true;
|
2021-05-26 13:33:26 +02:00
|
|
|
|
|
|
|
void looped::player_specate()
|
|
|
|
{
|
2021-07-23 23:02:26 +02:00
|
|
|
if (!g.selected_player.is_online || !g.player.spectating)
|
|
|
|
{
|
|
|
|
if (g.player.spectating) g.player.spectating = false;
|
2021-05-26 13:33:26 +02:00
|
|
|
|
2021-07-23 23:02:26 +02:00
|
|
|
if (!bReset)
|
|
|
|
{
|
|
|
|
bReset = true;
|
2021-05-26 13:33:26 +02:00
|
|
|
|
2021-07-23 23:02:26 +02:00
|
|
|
g_pointers->m_spectate_player(false, -1);
|
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
g_pointers->m_spectate_player(true, PLAYER::GET_PLAYER_PED_SCRIPT_INDEX(g.selected_player.id));
|
|
|
|
|
|
|
|
bReset = false;
|
2021-05-26 13:33:26 +02:00
|
|
|
}
|
|
|
|
}
|