From 45d0b8c86854c693ab97060d672be60a3a557fc5 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Sun, 4 Jun 2023 22:12:23 +0500 Subject: [PATCH] Basic gamemodes menu --- .../beatrun/gamemode/cl/ToolMenuSettings.lua | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua b/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua index 29178c4..0cb7fcd 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/ToolMenuSettings.lua @@ -211,7 +211,14 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function() InfectionButton:SetText("Toggle Infection Gamemode") InfectionButton:SetSize(0, 20) InfectionButton.DoClick = function() - if GetGlobalBool(GM_DATATHEFT) then return notification.AddLegacy("Another gamemode is running!", NOTIFY_HINT, 2) end + -- if GetGlobalBool(GM_DATATHEFT) then return notification.AddLegacy("Another gamemode is running!", NOTIFY_HINT, 2) end + if GetGlobalBool(GM_DATATHEFT) then + InfectionButton:SetText("Another gamemode is running!") + timer.Simple(2, function() + InfectionButton:SetText("Toggle Infection Gamemode") + end) + return + end StartInfection() end @@ -221,7 +228,14 @@ hook.Add("PopulateToolMenu", "Beatrun_ToolMenu", function() DatatheftButton:SetText("Toggle Data Theft Gamemode") DatatheftButton:SetSize(0, 20) DatatheftButton.DoClick = function() - if GetGlobalBool(GM_INFECTION) then return notification.AddLegacy("Another gamemode is running!", NOTIFY_HINT, 2) end + -- if GetGlobalBool(GM_INFECTION) then return notification.AddLegacy("Another gamemode is running!", NOTIFY_HINT, 2) end + if GetGlobalBool(GM_INFECTION) then + InfectionButton:SetText("Another gamemode is running!") + timer.Simple(2, function() + InfectionButton:SetText("Toggle Data Theft Gamemode") + end) + return + end StartDataTheft() end