fixed bugs & bump version

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

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

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

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