This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/src/backend/looped/vehicle/block_homing.cpp

26 lines
648 B
C++
Raw Normal View History

#include "natives.hpp"
#include "backend/looped_command.hpp"
#include "gta/enums.hpp"
namespace big
{
class block_homing : looped_command
{
using looped_command::looped_command;
virtual void on_tick() override
{
if (g_local_player && g_local_player->m_vehicle)
g_local_player->m_vehicle->m_is_targetable = false;
}
virtual void on_disable() override
{
if (g_local_player && g_local_player->m_vehicle)
g_local_player->m_vehicle->m_is_targetable = true;
}
};
block_homing g_block_homing("blockhoming", "Block Homing Missiles", "Prevents homing missiles from locking on to your vehicle", g.vehicle.block_homing);
}