add check pair afk - freeze auto load/unload

test-utf-8
rubin 2 years ago
parent 599763cf8d
commit 3ba301b167
  1. 3
      TruckHUD.lua

@ -1162,6 +1162,7 @@ function doRenderStats()
if
os.difftime(msk_timestamp, timer) > 180 and
autoh and
(not isPairModeActive() or (isPairModeActive() and (msk_timestamp - pair_timestamp) < 5)) and
(not isPairModeActive() or (isPairModeActive() and (pair_ready and player_ready))) and
not (isPairModeActive() and inifiles.Settings.auto_load_unload_kd_pair_use and base[pair_mode_name].gruz == current_load and os.difftime(msk_timestamp, base[pair_mode_name].timer) <= 180)
then
@ -1292,7 +1293,7 @@ function doRenderStats()
local color = ( not player_ready and "" or (
pair_ready and "{07a817}" or "{d90b0b}"
))
string_render, Y = string.format(" {%s}%s%s[%s]%s", c2, color, pair_mode_name, pair_mode_id, (afk > 9 and ' [AFK: '..math.ceil(afk)..']' or '')), Y + height + down
string_render, Y = string.format(" {%s}%s%s[%s]%s", c2, color, pair_mode_name, pair_mode_id, (afk > 5 and ' [AFK: '..math.ceil(afk)..']' or '')), Y + height + down
drawClickableText(string_render, X, Y)
local para_pos = FindSklad(pair_table["pos"]["x"], pair_table["pos"]["y"], pair_table["pos"]["z"])
string_render, Y = string.format("{%s} [{%s}%s{%s}] %s (%s m)", c2, (timer_d < 11 and (timer_d > 0 and 'b50000' or c2) or c2), (timer_d > 0 and string.format('%d:%02d', math.floor(timer_d / 60), timer_d % 60) or '0:00'), c2, para_pos.text, math.ceil(para_pos.dist)), Y + height

Loading…
Cancel
Save