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.
maybegreat48 4589b87553
Menu revamp (#3274)
* Complete player and network UI redesign, meant to show all features instead of stuffing them into tiny boxes
* Added option to delete player vehicles
* Better clone player (now clones head blend too)
* Better host token spoofing, with an option to enter your own
* Better host token spoofing detection
* Better desync kick prot detections
* A script blocker for the entire session (per-player options will be added later)
* Added option to spoof data/DLC hashes
* Logging framework that allows developers to easily debug false positives
* Major protection improvements
2024-06-27 10:32:17 +02:00

35 lines
837 B
C++

#include "backend/looped/looped.hpp"
#include "core/enums.hpp"
#include "gta/enums.hpp"
#include "util/entity.hpp"
#include "natives.hpp"
namespace big
{
void looped::weapons_cage_gun()
{
if (g.weapons.custom_weapon == CustomWeapon::CAGE_GUN && (!g.self.custom_weapon_stop || WEAPON::IS_PED_ARMED(self::ped, 4 | 2)))
{
if (PAD::IS_DISABLED_CONTROL_PRESSED(0, (int)ControllerInputs::INPUT_AIM))
{
if (PAD::IS_DISABLED_CONTROL_JUST_RELEASED(0, (int)ControllerInputs::INPUT_ATTACK))
{
Entity entity;
if (entity::raycast(&entity))
{
if (ENTITY::IS_ENTITY_A_PED(entity))
{
entity::cage_ped(entity);
}
}
else
{
g_notification_service.push_error("CUSTOM_WEAPONS"_T.data(), "BACKEND_LOOPED_WEAPONS_CAGE_GUN_NO_ENTITY_FOUND"_T.data());
}
}
}
}
}
}