feat(Spoofing): add interior and cutscene check (#803)
This commit is contained in:
parent
5260b27899
commit
081dd6d694
@ -1,13 +1,18 @@
|
||||
#include "hooking.hpp"
|
||||
#include <datanodes/player/CPlayerGameStateDataNode.hpp>
|
||||
#include "natives.hpp"
|
||||
|
||||
namespace big
|
||||
{
|
||||
bool is_player_in_cutscene(Player player) { return NETWORK::NETWORK_IS_PLAYER_IN_MP_CUTSCENE(player); }
|
||||
|
||||
bool is_player_in_interior(Ped player) { return (INTERIOR::GET_INTERIOR_FROM_ENTITY(player) != 0); }
|
||||
|
||||
bool hooks::write_player_game_state_data_node(rage::netObject* player, CPlayerGameStateDataNode* node)
|
||||
{
|
||||
auto ret = g_hooking->get_original<write_player_game_state_data_node>()(player, node);
|
||||
|
||||
if (g.spoofing.spoof_hide_god)
|
||||
if (g.spoofing.spoof_hide_god && !is_player_in_cutscene(self::id) && !is_player_in_interior(self::ped))
|
||||
{
|
||||
node->m_is_invincible = false;
|
||||
node->m_bullet_proof = false;
|
||||
|
Reference in New Issue
Block a user