fixed bugs & bump version

master
rubin 2 months ago
parent 18f4cd613c
commit 9eb4399b17
  1. 3
      changelog
  2. 10
      mafia-tools.lua
  3. 2
      version

@ -38,3 +38,6 @@
Добавлена поддержка сервера Underground Добавлена поддержка сервера Underground
Версия от 05.07.2025 Версия от 05.07.2025
Фикс флуда перегона Фикс флуда перегона
Версия от 28.11.2025
Фикс не выключался флуд перегона
Фикс не сохранялись после релога armoff id

@ -1,6 +1,6 @@
script_name('mafia-tools') script_name('mafia-tools')
script_author("Serhiy_Rubin") script_author("Serhiy_Rubin")
script_version("05.07.2025") script_version("28.11.2025")
sampev = require 'samp.events' sampev = require 'samp.events'
inicfg = require "inicfg" inicfg = require "inicfg"
@ -1078,6 +1078,7 @@ end
mhcars = {} mhcars = {}
mhcars.time = 0 mhcars.time = 0
mhcars.onServerMessage = function(color, message) mhcars.onServerMessage = function(color, message)
if config.data.mhcars.auto then
if message == " Вы не являетесь лидером/замом мафии" or if message == " Вы не являетесь лидером/замом мафии" or
message == " Ожидайте принятия задания" or message == " Ожидайте принятия задания" or
message == " Задание уже начато" or message == " Задание уже начато" or
@ -1110,11 +1111,12 @@ mhcars.onServerMessage = function(color, message)
request.wait = 0 request.wait = 0
end end
end --> by Richard_Holmes end --> by Richard_Holmes
end
end end
mhcars.loop = function() mhcars.loop = function()
while true do while true do
wait(0) wait(0)
if sampIsLocalPlayerSpawned() and isPlayerInMafia() and config.data.stats.rank >= 9 then if sampIsLocalPlayerSpawned() and isPlayerInMafia() and config.data.mhcars.auto and config.data.stats.rank >= 9 then
if mhcars.time == 0 then if mhcars.time == 0 then
if mhcars.antiflood == nil or os.time() - mhcars.antiflood > 1 then if mhcars.antiflood == nil or os.time() - mhcars.antiflood > 1 then
mhcars.antiflood = os.time() mhcars.antiflood = os.time()
@ -1936,11 +1938,11 @@ config.init = function()
config.save(config.default) config.save(config.default)
end end
config.read() config.read()
for k,v in pairs(config.default) do for k,v in pairs(config.default) doА
if config.data[k] == nil then if config.data[k] == nil then
config.data[k] = v config.data[k] = v
end end
if type(v) == "table" then if type(v) == "table" and k ~= "armoff" then
for kk,vv in pairs(v) do for kk,vv in pairs(v) do
if config.data[k][kk] == nil then if config.data[k][kk] == nil then
config.data[k][kk] = vv config.data[k][kk] = vv

@ -1 +1 @@
05.07.2025 28.11.2025
Loading…
Cancel
Save