Merge pull request #21 from skkuull/main

add director's cut command
This commit is contained in:
quaK 2023-02-10 13:02:18 +02:00 committed by GitHub
commit 1bf6b51986
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -400,6 +400,20 @@ namespace command
game::Com_GameMode_SetDesiredGameMode(game::GAME_MODE_CP);
});
add("director_cut", [](const params& params)
{
if (params.size() == 2)
{
const auto value = static_cast<int>(atoi(params.get(1)));
utils::hook::set<int>(0x5ECB830_b, value);
}
else
{
const auto command = params.get(0);
console::error("Incorrect number of arguments for \"%s\".\n", command);
}
});
add_sv("god", [](const int client_num, const params_sv&)
{
if (!cheats_ok(client_num))