mirror of
https://github.com/YimMenu/YimMenuV2.git
synced 2026-10-10 03:43:15 +08:00
add Disable Critical Hits + Infinite Boundary + giveplayerallweapon (#636)
* add Infinite Boundary and Critical Hits
* Revert "add Infinite Boundary and Critical Hits"
This reverts commit c537e1fa7a.
* add Infinite Boundary and Critical Hits
* add Critical Hits + Infinite Boundary
* giveplayerallweapon
* host kick all
* Improving InfiniteBoundary
* Improving DisableCriticalHits
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
build/
|
build/
|
||||||
.cache
|
.cache
|
||||||
.vs
|
.vs
|
||||||
|
out/
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
#include "game/commands/PlayerCommand.hpp"
|
||||||
|
#include "core/commands/Command.hpp"
|
||||||
|
#include "game/backend/Self.hpp"
|
||||||
|
#include "game/gta/data/Weapons.hpp"
|
||||||
|
|
||||||
|
|
||||||
|
namespace YimMenu::Features
|
||||||
|
{
|
||||||
|
class GivePlayerAllWeapon : public PlayerCommand
|
||||||
|
{
|
||||||
|
using PlayerCommand::PlayerCommand;
|
||||||
|
|
||||||
|
virtual void OnCall(Player player) override
|
||||||
|
{
|
||||||
|
for (auto weapon : g_WeaponHashes)
|
||||||
|
player.GetPed().GiveWeapon(weapon);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
static GivePlayerAllWeapon _GivePlayerAllWeapon{"giveplayerallweapon", "GivePlayerAllWeapon", "Give All Weapon the player"};
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
#include "core/commands/LoopedCommand.hpp"
|
||||||
|
#include "game/backend/Self.hpp"
|
||||||
|
#include "game/gta/Pools.hpp"
|
||||||
|
#include <game/gta/Natives.hpp>
|
||||||
|
|
||||||
|
namespace YimMenu::Features
|
||||||
|
{
|
||||||
|
class DisableCriticalHits : public LoopedCommand
|
||||||
|
{
|
||||||
|
using LoopedCommand::LoopedCommand;
|
||||||
|
virtual void OnTick() override
|
||||||
|
{
|
||||||
|
PED::SET_PED_SUFFERS_CRITICAL_HITS(Self::GetPed().GetHandle(), FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void OnDisable() override
|
||||||
|
{
|
||||||
|
PED::SET_PED_SUFFERS_CRITICAL_HITS(Self::GetPed().GetHandle(), TRUE);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
static DisableCriticalHits _DisableCriticalHits{"disablecriticalhits", "Disable Critical Hits", "Prevent you from getting Critical Hits"};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
#include "core/commands/LoopedCommand.hpp"
|
||||||
|
#include "game/backend/Self.hpp"
|
||||||
|
#include "game/gta/Pools.hpp"
|
||||||
|
#include <game/gta/Natives.hpp>
|
||||||
|
#include "core/commands/FloatCommand.hpp"
|
||||||
|
|
||||||
|
namespace YimMenu::Features
|
||||||
|
{
|
||||||
|
static FloatCommand _ExplosionRadiusScale{"explosionradiusscale", "Weapon Explosion RadiusScale", "Modifying Weapon Explosion RadiusScale", 0.0f, 10.0f, 1.0f};
|
||||||
|
|
||||||
|
class ExplosionRadius : public LoopedCommand
|
||||||
|
{
|
||||||
|
using LoopedCommand::LoopedCommand;
|
||||||
|
|
||||||
|
void OnTick() override
|
||||||
|
{
|
||||||
|
Hash weapon;
|
||||||
|
if (WEAPON::GET_CURRENT_PED_WEAPON(Self::GetPed().GetHandle(), &weapon, 0))
|
||||||
|
{
|
||||||
|
WEAPON::SET_WEAPON_AOE_MODIFIER(weapon, _ExplosionRadiusScale.GetState());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
static ExplosionRadius _ExplosionRadius{"explosionradius", "Weapon Explosion Radius", "Modifying Weapon Explosion Radius"};
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
#include "core/commands/LoopedCommand.hpp"
|
||||||
|
#include "game/gta/Pools.hpp"
|
||||||
|
#include "game/backend/Self.hpp"
|
||||||
|
#include <game/gta/Natives.hpp>
|
||||||
|
|
||||||
|
namespace YimMenu::Features
|
||||||
|
{
|
||||||
|
class InfiniteBoundary : public LoopedCommand
|
||||||
|
{
|
||||||
|
using LoopedCommand::LoopedCommand;
|
||||||
|
virtual void OnTick() override
|
||||||
|
{
|
||||||
|
PLAYER::EXTEND_WORLD_BOUNDARY_FOR_PLAYER(-1e5, -1e5, -1e5);
|
||||||
|
PLAYER::EXTEND_WORLD_BOUNDARY_FOR_PLAYER(1e5, 1e5, 1e5);
|
||||||
|
}
|
||||||
|
virtual void OnDisable() override
|
||||||
|
{
|
||||||
|
PLAYER::RESET_WORLD_BOUNDARY_FOR_PLAYER();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
static InfiniteBoundary Infinitebundary{"infiniteboundary", "Infinite Boundary", "You won't die because of border restrictions."};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -83,6 +83,7 @@ namespace YimMenu::Submenus
|
|||||||
toxicGroup->AddItem(std::make_shared<CommandItem>("killexploitall"_J, "Permadeath All"));
|
toxicGroup->AddItem(std::make_shared<CommandItem>("killexploitall"_J, "Permadeath All"));
|
||||||
toxicGroup->AddItem(std::make_shared<CommandItem>("explodeall"_J, "Explode All"));
|
toxicGroup->AddItem(std::make_shared<CommandItem>("explodeall"_J, "Explode All"));
|
||||||
toxicGroup->AddItem(std::make_shared<CommandItem>("ceokickall"_J, "CEO Kick All"));
|
toxicGroup->AddItem(std::make_shared<CommandItem>("ceokickall"_J, "CEO Kick All"));
|
||||||
|
toxicGroup->AddItem(std::make_shared<CommandItem>("hkickall"_J, "hostkick for all player"));
|
||||||
|
|
||||||
miscGroup->AddItem(std::make_shared<BoolCommandItem>("forcethunder"_J));
|
miscGroup->AddItem(std::make_shared<BoolCommandItem>("forcethunder"_J));
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ namespace YimMenu::Submenus
|
|||||||
general->AddItem(std::make_shared<PlayerCommandItem>("sendsext"_J));
|
general->AddItem(std::make_shared<PlayerCommandItem>("sendsext"_J));
|
||||||
general->AddItem(std::make_shared<PlayerCommandItem>("sendphantomcar"_J));
|
general->AddItem(std::make_shared<PlayerCommandItem>("sendphantomcar"_J));
|
||||||
general->AddItem(std::make_shared<PlayerCommandItem>("sendgooch"_J));
|
general->AddItem(std::make_shared<PlayerCommandItem>("sendgooch"_J));
|
||||||
|
general->AddItem(std::make_shared<PlayerCommandItem>("giveplayerallweapon"_J));
|
||||||
|
|
||||||
bounty->AddItem(std::make_shared<IntCommandItem>("bountyamount"_J, "Amount"));
|
bounty->AddItem(std::make_shared<IntCommandItem>("bountyamount"_J, "Amount"));
|
||||||
bounty->AddItem(std::make_shared<BoolCommandItem>("anonymousbounty"_J, "Anonymous"));
|
bounty->AddItem(std::make_shared<BoolCommandItem>("anonymousbounty"_J, "Anonymous"));
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ namespace YimMenu::Submenus
|
|||||||
globalsGroup->AddItem(std::make_shared<BoolCommandItem>("formatmoney"_J));
|
globalsGroup->AddItem(std::make_shared<BoolCommandItem>("formatmoney"_J));
|
||||||
globalsGroup->AddItem(std::make_shared<BoolCommandItem>("mobileradio"_J));
|
globalsGroup->AddItem(std::make_shared<BoolCommandItem>("mobileradio"_J));
|
||||||
globalsGroup->AddItem(std::make_shared<BoolCommandItem>("keepplayerclean"_J));
|
globalsGroup->AddItem(std::make_shared<BoolCommandItem>("keepplayerclean"_J));
|
||||||
|
globalsGroup->AddItem(std::make_shared<BoolCommandItem>("disablecriticalhits"_J));
|
||||||
|
|
||||||
toolsGroup->AddItem(std::make_shared<CommandItem>("skipcutscene"_J));
|
toolsGroup->AddItem(std::make_shared<CommandItem>("skipcutscene"_J));
|
||||||
toolsGroup->AddItem(std::make_shared<CommandItem>("skipconversation"_J));
|
toolsGroup->AddItem(std::make_shared<CommandItem>("skipconversation"_J));
|
||||||
|
|||||||
@@ -227,6 +227,9 @@ namespace YimMenu::Submenus
|
|||||||
weaponsGlobalsGroup->AddItem(std::make_shared<ConditionalItem>("weapondamage"_J, std::make_shared<FloatCommandItem>("weapondamagescale"_J, std::nullopt, false)));
|
weaponsGlobalsGroup->AddItem(std::make_shared<ConditionalItem>("weapondamage"_J, std::make_shared<FloatCommandItem>("weapondamagescale"_J, std::nullopt, false)));
|
||||||
weaponsGlobalsGroup->AddItem(std::make_shared<BoolCommandItem>("meleedamage"_J));
|
weaponsGlobalsGroup->AddItem(std::make_shared<BoolCommandItem>("meleedamage"_J));
|
||||||
weaponsGlobalsGroup->AddItem(std::make_shared<ConditionalItem>("meleedamage"_J, std::make_shared<FloatCommandItem>("meleedamagescale"_J, std::nullopt, false)));
|
weaponsGlobalsGroup->AddItem(std::make_shared<ConditionalItem>("meleedamage"_J, std::make_shared<FloatCommandItem>("meleedamagescale"_J, std::nullopt, false)));
|
||||||
|
weaponsGlobalsGroup->AddItem(std::make_shared<BoolCommandItem>("explosionradius"_J));
|
||||||
|
weaponsGlobalsGroup->AddItem(std::make_shared<ConditionalItem>("explosionradius"_J, std::make_shared<FloatCommandItem>("explosionradiusscale"_J, std::nullopt, false)));
|
||||||
|
|
||||||
|
|
||||||
weaponsToolsGroup->AddItem(std::make_shared<CommandItem>("giveallweapons"_J));
|
weaponsToolsGroup->AddItem(std::make_shared<CommandItem>("giveallweapons"_J));
|
||||||
weaponsToolsGroup->AddItem(std::make_shared<CommandItem>("givemaxammo"_J));
|
weaponsToolsGroup->AddItem(std::make_shared<CommandItem>("givemaxammo"_J));
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ namespace YimMenu::Submenus
|
|||||||
otherOpts->AddItem(std::make_shared<BoolCommandItem>("PedRiotMode"_J));
|
otherOpts->AddItem(std::make_shared<BoolCommandItem>("PedRiotMode"_J));
|
||||||
otherOpts->AddItem(std::make_shared<BoolCommandItem>("CopsDispatch"_J));
|
otherOpts->AddItem(std::make_shared<BoolCommandItem>("CopsDispatch"_J));
|
||||||
otherOpts->AddItem(std::make_shared<BoolCommandItem>("enablecreatordevmode"_J));
|
otherOpts->AddItem(std::make_shared<BoolCommandItem>("enablecreatordevmode"_J));
|
||||||
|
otherOpts->AddItem(std::make_shared<BoolCommandItem>("infiniteboundary"_J));
|
||||||
|
|
||||||
main->AddItem(std::move(killPeds));
|
main->AddItem(std::move(killPeds));
|
||||||
main->AddItem(std::move(deleteOpts));
|
main->AddItem(std::move(deleteOpts));
|
||||||
|
|||||||
Reference in New Issue
Block a user