add hostkick (#259)

This commit is contained in:
latiao-1337
2025-05-02 04:45:33 +08:00
committed by GitHub
parent f3179fabbe
commit 8554c7bb24
2 changed files with 19 additions and 0 deletions
@@ -0,0 +1,18 @@
#include "game/commands/PlayerCommand.hpp"
#include "game/backend/NativeHooks.hpp"
#include "game/gta/Natives.hpp"
namespace YimMenu::Features
{
class HostKick : public PlayerCommand
{
using PlayerCommand::PlayerCommand;
virtual void OnCall(Player player) override
{
NETWORK::NETWORK_SESSION_KICK_PLAYER(player.GetId());
}
};
static HostKick _HostKick{"HKick", "Host Kick", "Only available as host and the target is unblockable"};
}
@@ -7,6 +7,7 @@ namespace YimMenu::Submenus
auto menu = std::make_shared<Category>("Kick");
auto kicks = std::make_shared<Group>("Kicks");
kicks->AddItem(std::make_shared<PlayerCommandItem>("hkick"_J));
kicks->AddItem(std::make_shared<PlayerCommandItem>("shkick"_J));
kicks->AddItem(std::make_shared<PlayerCommandItem>("endkick"_J));
kicks->AddItem(std::make_shared<PlayerCommandItem>("nfkick"_J));