From c5917c1f5a052ece2477229b4b25e8588051ca6d Mon Sep 17 00:00:00 2001 From: rubin Date: Sun, 29 Jan 2023 12:35:46 +0300 Subject: [PATCH] added message random second --- mafia-tools.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mafia-tools.lua b/mafia-tools.lua index 06692b0..b0139bf 100644 --- a/mafia-tools.lua +++ b/mafia-tools.lua @@ -33,6 +33,10 @@ end timer_2min = {} timer_2min.onServerMessage = function(color, message) if message:find("Война за бизнес .+ продлена на 2 минуты") then + local now = os.time() - config.data.time_2min + if now < 300 and (os.time() - config.data.time_2min) > 120 then + addChatMessage("2 мин длилось на "..((os.time() - config.data.time_2min) - 120).." секунд больше") + end config.data.time_2min = os.time() config.save(config.data) end