diff --git a/src/ATGUI/Tabs/triggerbottab.cpp b/src/ATGUI/Tabs/triggerbottab.cpp index 4da4a0b7a..97c14ec07 100644 --- a/src/ATGUI/Tabs/triggerbottab.cpp +++ b/src/ATGUI/Tabs/triggerbottab.cpp @@ -12,8 +12,8 @@ void Triggerbot::RenderTab() ImGui::Separator(); ImGui::Columns(2, NULL, true); { - ImGui::ItemSize(ImVec2(0.0f, 0.0f), 0.0f); - ImGui::Text("Trigger Key"); + ImGui::Checkbox("Enabled", &Settings::Triggerbot::keyEnabled); + SetTooltip("Enabling this means it you need to press a specific key to trigger"); } ImGui::NextColumn(); { @@ -76,4 +76,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 062e79a59..cd8ae4abe 100644 --- a/src/Hacks/triggerbot.cpp +++ b/src/Hacks/triggerbot.cpp @@ -15,13 +15,14 @@ bool Settings::Triggerbot::Filters::legs = true; bool Settings::Triggerbot::Delay::enabled = false; int Settings::Triggerbot::Delay::value = 250; ButtonCode_t Settings::Triggerbot::key = ButtonCode_t::KEY_LALT; +bool Settings::Triggerbot::keyEnabled = false; void Triggerbot::CreateMove(CUserCmd *cmd) { if (!Settings::Triggerbot::enabled) return; - if (!inputSystem->IsButtonDown(Settings::Triggerbot::key)) + if (Settings::Triggerbot::keyEnabled && !inputSystem->IsButtonDown(Settings::Triggerbot::key)) return; C_BasePlayer* localplayer = (C_BasePlayer*) entityList->GetClientEntity(engine->GetLocalPlayer()); diff --git a/src/settings.h b/src/settings.h index fbc06d98f..fe4943ffc 100644 --- a/src/settings.h +++ b/src/settings.h @@ -423,6 +423,7 @@ namespace Settings { extern bool enabled; extern ButtonCode_t key; + extern bool keyEnabled; namespace Filters {