2022-12-22 21:23:32 +00:00
|
|
|
#include "backend/player_command.hpp"
|
2023-03-01 21:27:15 +00:00
|
|
|
#include "core/scr_globals.hpp"
|
2022-12-22 21:23:32 +00:00
|
|
|
#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;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2023-06-06 07:40:40 +00:00
|
|
|
script_host_kick g_script_host_kick("shkick", "SCRIPT_HOST_KICK", "SCRIPT_HOST_KICK_DESC", 0, false);
|
2022-12-22 21:23:32 +00:00
|
|
|
}
|