mirror of
https://github.com/diamante0018/MW3ServerFreezer.git
synced 2025-04-19 11:42:53 +00:00
Fix cmd
This commit is contained in:
parent
c6fecc308b
commit
c96f40944f
@ -65,12 +65,14 @@ private:
|
||||
static void add_key_hooks() {
|
||||
key_catcher::on_key_press(
|
||||
"O", []([[maybe_unused]] const game::LocalClientNum_t& local_client) {
|
||||
command::execute("exploit");
|
||||
game::Dvar_SetBool(cl_exploit, true);
|
||||
console::info("Enabled cl_exploit");
|
||||
});
|
||||
|
||||
key_catcher::on_key_press(
|
||||
"L", []([[maybe_unused]] const game::LocalClientNum_t& local_client) {
|
||||
command::execute("undoExploit");
|
||||
game::Dvar_SetBool(cl_exploit, false);
|
||||
console::info("Disabled cl_exploit");
|
||||
});
|
||||
|
||||
key_catcher::on_key_press(
|
||||
@ -80,25 +82,11 @@ private:
|
||||
}
|
||||
|
||||
static void add_exploit_commands() {
|
||||
command::add("exploit", []([[maybe_unused]] const command::params& params) {
|
||||
game::Dvar_SetBool(cl_exploit, true);
|
||||
console::info("Enabled cl_exploit");
|
||||
});
|
||||
|
||||
command::add("undoExploit",
|
||||
[]([[maybe_unused]] const command::params& params) {
|
||||
game::Dvar_SetBool(cl_exploit, false);
|
||||
console::info("Disabled cl_exploit");
|
||||
});
|
||||
|
||||
command::add(
|
||||
"sendCommand", []([[maybe_unused]] const command::params& params) {
|
||||
if (params.size() < 2)
|
||||
return;
|
||||
|
||||
if (*game::connectionState <= game::connstate_t::CA_CHALLENGING)
|
||||
return;
|
||||
|
||||
const auto cmd = std::format("queryserverinfo ;{}", params.join(1));
|
||||
console::info("Sending OOB packet {}", cmd);
|
||||
game::NET_OutOfBandPrint(game::NS_SERVER,
|
||||
|
Loading…
x
Reference in New Issue
Block a user