mirror of
https://github.com/YimMenu/YimMenuV2.git
synced 2026-10-10 03:43:15 +08:00
add peds ignore and CopsDispatch and PedRiotMode and ExplosiveAmmo (#279)
* add peds ignore * CopsDispatch * PedRiotMode * ExplosiveAmmo * improve
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#include "core/commands/LoopedCommand.hpp"
|
||||
#include "game/backend/Self.hpp"
|
||||
#include "game/gta/Pools.hpp"
|
||||
|
||||
#include <game/gta/Natives.hpp>
|
||||
|
||||
namespace YimMenu::Features
|
||||
{
|
||||
class ExplosiveAmmo : public LoopedCommand
|
||||
{
|
||||
using LoopedCommand::LoopedCommand;
|
||||
virtual void OnTick() override
|
||||
{
|
||||
MISC::SET_EXPLOSIVE_AMMO_THIS_FRAME(Self::GetPlayer().GetId());
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
static ExplosiveAmmo _ExplosiveAmmo{"ExplosiveAmmo", "Explosive Ammo", "Every bullet you shoot explodes."};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
#include "core/commands/LoopedCommand.hpp"
|
||||
#include "game/backend/Self.hpp"
|
||||
#include "game/gta/Pools.hpp"
|
||||
|
||||
#include <game/gta/Natives.hpp>
|
||||
|
||||
namespace YimMenu::Features
|
||||
{
|
||||
class CopsDispatch : public LoopedCommand
|
||||
{
|
||||
using LoopedCommand::LoopedCommand;
|
||||
virtual void OnTick() override
|
||||
{
|
||||
PLAYER::SET_DISPATCH_COPS_FOR_PLAYER(Self::GetPlayer().GetId(), FALSE);
|
||||
}
|
||||
|
||||
virtual void OnDisable() override
|
||||
{
|
||||
PLAYER::SET_DISPATCH_COPS_FOR_PLAYER(Self::GetPlayer().GetId(), TRUE);
|
||||
}
|
||||
};
|
||||
|
||||
static CopsDispatch _CopsDispatch{"CopsDispatch", "Cops Dispatch", "When you are wanted, no police will be spawned."};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
#include "core/commands/LoopedCommand.hpp"
|
||||
#include "game/gta/Pools.hpp"
|
||||
#include "game/backend/Self.hpp"
|
||||
#include <game/gta/Natives.hpp>
|
||||
|
||||
namespace YimMenu::Features
|
||||
{
|
||||
class PedIgnore : public LoopedCommand
|
||||
{
|
||||
using LoopedCommand::LoopedCommand;
|
||||
virtual void OnTick() override
|
||||
{
|
||||
PLAYER::SET_EVERYONE_IGNORE_PLAYER(Self::GetPlayer().GetId(), TRUE);
|
||||
PLAYER::SET_POLICE_IGNORE_PLAYER(Self::GetPlayer().GetId(), TRUE);
|
||||
PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS_FOR_AMBIENT_PEDS_THIS_FRAME(TRUE);
|
||||
PED::SET_PED_RESET_FLAG(Self::GetPed().GetHandle(), 124, true);
|
||||
|
||||
}
|
||||
|
||||
virtual void OnDisable() override
|
||||
{
|
||||
PLAYER::SET_EVERYONE_IGNORE_PLAYER(Self::GetPlayer().GetId(), FALSE);
|
||||
PLAYER::SET_POLICE_IGNORE_PLAYER(Self::GetPlayer().GetId(), FALSE);
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
static PedIgnore _PedIgnore{"pedsignore", "Peds Ignore", "Nearby peds will ignore you and become oblivious to your actions."};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
#include "core/commands/LoopedCommand.hpp"
|
||||
#include "game/backend/Self.hpp"
|
||||
#include "game/gta/Pools.hpp"
|
||||
|
||||
#include <game/gta/Natives.hpp>
|
||||
|
||||
namespace YimMenu::Features
|
||||
{
|
||||
class PedRiotMode : public LoopedCommand
|
||||
{
|
||||
using LoopedCommand::LoopedCommand;
|
||||
virtual void OnTick() override
|
||||
{
|
||||
MISC::SET_RIOT_MODE_ENABLED(TRUE);
|
||||
}
|
||||
|
||||
virtual void OnDisable() override
|
||||
{
|
||||
MISC::SET_RIOT_MODE_ENABLED(FALSE);
|
||||
}
|
||||
};
|
||||
|
||||
static PedRiotMode _PedRiotMode{"PedRiotMode", "Riot Mode", "All PEDs attack each other."};
|
||||
|
||||
}
|
||||
@@ -66,6 +66,7 @@ namespace YimMenu::Submenus
|
||||
weaponsGlobalsGroup->AddItem(std::make_shared<BoolCommandItem>("rapidfire"_J));
|
||||
weaponsGlobalsGroup->AddItem(std::make_shared<BoolCommandItem>("aimbot"_J));
|
||||
weaponsGlobalsGroup->AddItem(std::make_shared<BoolCommandItem>("infiniteparachutes"_J));
|
||||
weaponsGlobalsGroup->AddItem(std::make_shared<BoolCommandItem>("ExplosiveAmmo"_J));
|
||||
weaponsGlobalsGroup->AddItem(std::make_shared<CommandItem>("giveallweapons"_J));
|
||||
|
||||
weapons->AddItem(weaponsGlobalsGroup);
|
||||
|
||||
@@ -27,10 +27,16 @@ namespace YimMenu::Submenus
|
||||
weatherOpts->AddItem(std::make_shared<ConditionalItem>("forceweather"_J, std::make_shared<CommandItem>("setweather"_J), true));
|
||||
weatherOpts->AddItem(std::make_shared<BoolCommandItem>("forceweather"_J));
|
||||
|
||||
auto otherOpts = std::make_shared<Group>("Other", 1);
|
||||
otherOpts->AddItem(std::make_shared<BoolCommandItem>("pedsignore"_J));
|
||||
otherOpts->AddItem(std::make_shared<BoolCommandItem>("PedRiotMode"_J));
|
||||
otherOpts->AddItem(std::make_shared<BoolCommandItem>("CopsDispatch"_J));
|
||||
|
||||
main->AddItem(std::move(killPeds));
|
||||
main->AddItem(std::move(deleteOpts));
|
||||
main->AddItem(std::move(bringOpts));
|
||||
main->AddItem(std::move(weatherOpts));
|
||||
main->AddItem(std::move(otherOpts));
|
||||
|
||||
auto spawnGroup = std::make_shared<Group>("Vehicle");
|
||||
auto modsGroup = std::make_shared<Group>("Modifications");
|
||||
@@ -52,6 +58,9 @@ namespace YimMenu::Submenus
|
||||
iplsGroup->AddItem(std::make_shared<CommandItem>("unloadipl"_J));
|
||||
iplsGroup->AddItem(std::make_shared<CommandItem>("ipltp"_J));
|
||||
|
||||
|
||||
|
||||
|
||||
AddCategory(std::move(main));
|
||||
AddCategory(std::move(spawnersGroup));
|
||||
AddCategory(std::move(iplsGroup));
|
||||
|
||||
Reference in New Issue
Block a user