auto load/unload off if pair is off

test-utf-8
rubin 2 years ago
parent 3ba301b167
commit 9d40f25b79
  1. 43
      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

Loading…
Cancel
Save