From 9d40f25b79e1106eb172c85238ff2e6acf582473 Mon Sep 17 00:00:00 2001 From: rubin Date: Mon, 9 Jan 2023 19:28:26 +0300 Subject: [PATCH] auto load/unload off if pair is off --- TruckHUD.lua | 43 ++++++------------------------------------- 1 file changed, 6 insertions(+), 37 deletions(-) diff --git a/TruckHUD.lua b/TruckHUD.lua index 77331eb..75a3cdf 100644 --- a/TruckHUD.lua +++ b/TruckHUD.lua @@ -938,43 +938,6 @@ function doDialog() end end end - if caption == "Truck-HUD: Меню" then - if result then - if button == 1 then - if list == 0 then - script_run = not script_run - ShowDialog1(9) - end - if list == 1 then - auto = not auto - ShowDialog1(9) - end - if list == 2 then - inifiles.Settings.Report = not inifiles.Settings.Report - settings_save() - ShowDialog1(9) - end - if list == 3 then - if pair_mode then - pair_mode = false - menu[4].run = false - ShowDialog1(9) - else - ShowDialog1(8) - end - end - if list == 4 then - inifiles.Settings.Binder = not inifiles.Settings.Binder - settings_save() - ShowDialog1(9) - end - if list >= 5 then - local S1 = {[5] = 1, [6] = 2, [7] = 3} - pos[S1] = true - end - end - end - end end function doPair() @@ -986,6 +949,11 @@ function doPair() "Напарник " .. pair_mode_name .. "[" .. pair_mode_id .. "]" .. " вышел из игры. Режим пары выключен.", -1 ) + if auto then + auto = false + menu[2].run = false + sampAddChatMessage("Режим АВТО TruckHUD выключен!", -1) + end end -- Проверка напарника на противоположное место @@ -2179,6 +2147,7 @@ function loadEvents() end if params:lower() == " auto" then auto = not auto + menu[2].run = auto return false end if params:lower() == " chat" then