mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-19 07:28:04 +08:00
31 lines
808 B
C++
31 lines
808 B
C++
#include "backend/player_command.hpp"
|
|
#include "core/scr_globals.hpp"
|
|
#include "natives.hpp"
|
|
#include "pointers.hpp"
|
|
#include "util/scripts.hpp"
|
|
|
|
namespace big
|
|
{
|
|
class script_host_kick : player_command
|
|
{
|
|
using player_command::player_command;
|
|
|
|
virtual CommandAccessLevel get_access_level()
|
|
{
|
|
return CommandAccessLevel::TOXIC;
|
|
}
|
|
|
|
virtual void execute(player_ptr player, const std::vector<std::uint64_t>& _args, const std::shared_ptr<command_context> ctx)
|
|
{
|
|
if (!scripts::force_host(RAGE_JOAAT("freemode")))
|
|
{
|
|
g_notification_service->push_error("Kick", "Force script host failed!");
|
|
return;
|
|
}
|
|
|
|
*scr_globals::gsbd_kicking.at(player->id(), 1).as<bool*>() = true;
|
|
}
|
|
};
|
|
|
|
script_host_kick g_script_host_kick("shkick", "SCRIPT_HOST_KICK", "SCRIPT_HOST_KICK_DESC", 0, false);
|
|
} |