diff --git a/src/ATGUI/Tabs/triggerbottab.cpp b/src/ATGUI/Tabs/triggerbottab.cpp index 3b8920bd2..97d9780c2 100644 --- a/src/ATGUI/Tabs/triggerbottab.cpp +++ b/src/ATGUI/Tabs/triggerbottab.cpp @@ -13,7 +13,7 @@ void Triggerbot::RenderTab() ImGui::Columns(2, NULL, true); { ImGui::ItemSize(ImVec2(0.0f, 0.0f), 0.0f); - ImGui::Text(XORSTR("Trigger Key")); + ImGui::Checkbox(XORSTR("Enable"), &Settings::Triggerbot::keybindEnabled); } ImGui::NextColumn(); { @@ -91,4 +91,4 @@ void Triggerbot::RenderTab() ImGui::EndChild(); } } -} \ No newline at end of file +} diff --git a/src/Hacks/triggerbot.cpp b/src/Hacks/triggerbot.cpp index af022f05c..4ac51676a 100644 --- a/src/Hacks/triggerbot.cpp +++ b/src/Hacks/triggerbot.cpp @@ -17,13 +17,14 @@ int Settings::Triggerbot::RandomDelay::lowBound = 20; int Settings::Triggerbot::RandomDelay::highBound = 35; int Settings::Triggerbot::RandomDelay::lastRoll = 0; ButtonCode_t Settings::Triggerbot::key = ButtonCode_t::KEY_LALT; +bool Settings::Triggerbot::keybindEnabled = true; void Triggerbot::CreateMove(CUserCmd *cmd) { if (!Settings::Triggerbot::enabled) return; - if (!inputSystem->IsButtonDown(Settings::Triggerbot::key)) + if (!inputSystem->IsButtonDown(Settings::Triggerbot::key) && Settings::Triggerbot::keybindEnabled) return; C_BasePlayer* localplayer = (C_BasePlayer*) entityList->GetClientEntity(engine->GetLocalPlayer()); diff --git a/src/settings.h b/src/settings.h index fc03a57de..585115c92 100644 --- a/src/settings.h +++ b/src/settings.h @@ -528,6 +528,7 @@ namespace Settings { extern bool enabled; extern ButtonCode_t key; + extern bool keybindEnabled; namespace Filters {