add peds ignore and CopsDispatch and PedRiotMode and ExplosiveAmmo (#279)

* add peds ignore

* CopsDispatch

* PedRiotMode

* ExplosiveAmmo

* improve
This commit is contained in:
latiao-1337
2025-05-05 09:43:21 +08:00
committed by GitHub
parent 947cae56c4
commit 3fd450c396
6 changed files with 111 additions and 0 deletions
+21
View File
@@ -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."};
}
+25
View File
@@ -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."};
}
+30
View File
@@ -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."};
}
+25
View File
@@ -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."};
}
+1
View File
@@ -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);
+9
View File
@@ -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));