From 785aac1a18c2a13cdf11da518519e4c80d9b68e8 Mon Sep 17 00:00:00 2001 From: Mycroft Date: Mon, 1 Aug 2022 19:32:49 +0100 Subject: [PATCH] fix: esx_lscustom: TextUI not appearing --- [esx_addons]/esx_lscustom/client/main.lua | 18 ++++-------------- [esx_addons]/esx_lscustom/locales/en.lua | 2 +- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/[esx_addons]/esx_lscustom/client/main.lua b/[esx_addons]/esx_lscustom/client/main.lua index c5c8b803..ba9cbe58 100644 --- a/[esx_addons]/esx_lscustom/client/main.lua +++ b/[esx_addons]/esx_lscustom/client/main.lua @@ -479,6 +479,7 @@ end) CreateThread(function() while true do local Sleep = 1500 + local Near = false local playerPed = PlayerPedId() if IsPedInAnyVehicle(playerPed, false) then @@ -488,14 +489,14 @@ CreateThread(function() if (ESX.PlayerData.job and ESX.PlayerData.job.name == 'mechanic') or not Config.IsMechanicJobOnly then for k, v in pairs(Config.Zones) do local zonePos = vector3(v.Pos.x, v.Pos.y, v.Pos.z) - if #(coords - zonePos) < v.Size.x then + if #(coords - zonePos) < 10.0 then + Near = true Sleep = 0 if not lsMenuIsShowed then if not HintDisplayed then HintDisplayed = true ESX.TextUI(v.Hint) end - if IsControlJustReleased(0, 38) then lsMenuIsShowed = true @@ -527,21 +528,10 @@ CreateThread(function() end end) end - else - if HintDisplayed then - HintDisplayed = false - ESX.HideUI() - end - end - else - if HintDisplayed then - HintDisplayed = false - ESX.HideUI() end end end - else - if HintDisplayed then + if not Near and HintDisplayed then HintDisplayed = false ESX.HideUI() end diff --git a/[esx_addons]/esx_lscustom/locales/en.lua b/[esx_addons]/esx_lscustom/locales/en.lua index 7f9b7fa9..3f7b5ec9 100644 --- a/[esx_addons]/esx_lscustom/locales/en.lua +++ b/[esx_addons]/esx_lscustom/locales/en.lua @@ -4,7 +4,7 @@ Locales['en'] = { ['already_own'] = 'you already own: %s', ['not_enough_money'] = 'you cannot afford this mod!', ['purchased'] = 'you have purchased the mod!', - ['press_custom'] = 'press ~INPUT_PICKUP~ to personalize your vehicle.', + ['press_custom'] = 'press ~b~[E]~s~ to Personalise Your Vehicle', ['level'] = 'level %s', ['neon'] = 'neon', ['blip_name'] = 'los Santos Customs',