diff --git a/src/client/component/command.cpp b/src/client/component/command.cpp index f9746040..760a3b0b 100644 --- a/src/client/component/command.cpp +++ b/src/client/component/command.cpp @@ -7,6 +7,7 @@ #include "game/scripting/execution.hpp" #include "command.hpp" +#include "scheduler.hpp" #include "game_console.hpp" #include "chat.hpp" #include "fastfiles.hpp" @@ -426,6 +427,26 @@ namespace command { } }); + + add("kill", [](const params& params) + { + if (!game::SV_Loaded()) + { + return; + } + + scheduler::once([]() + { + try + { + const scripting::entity player = scripting::call("getentbynum", {0}).as(); + player.call("kill"); + } + catch (...) + { + } + }, scheduler::pipeline::server); + }); } }; }