From e6f9d904789044013e5ac3105688810c1dcc3345 Mon Sep 17 00:00:00 2001 From: NRTnarathip <61742272+NRTnarathip@users.noreply.github.com> Date: Wed, 16 Feb 2022 14:55:13 +0700 Subject: [PATCH 1/2] Fix Error esx_lcustom vector3 - type table error when coords - v.Pos type vector3 - table it be should vector3 - vector3 --- [esx_addons]/esx_lscustom/client/main.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/[esx_addons]/esx_lscustom/client/main.lua b/[esx_addons]/esx_lscustom/client/main.lua index 498a6b3a6..abf5242b6 100644 --- a/[esx_addons]/esx_lscustom/client/main.lua +++ b/[esx_addons]/esx_lscustom/client/main.lua @@ -387,7 +387,8 @@ 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 - if #(coords - v.Pos) < v.Size.x and not lsMenuIsShowed then + local zonePos = vector3(v.Pos.x, v.Pos.y, v.Pos.z) + if #(coords - zonePos) < v.Size.x and not lsMenuIsShowed then isInLSMarker = true ESX.ShowHelpNotification(v.Hint) break From f81cdcdfeae295c86ec572a577908325b57e0d66 Mon Sep 17 00:00:00 2001 From: NRTnarathip <61742272+NRTnarathip@users.noreply.github.com> Date: Wed, 16 Feb 2022 14:59:52 +0700 Subject: [PATCH 2/2] optimize a little change args of GetEntityCoords() From function PlayerPedId() To variable playerPed --- [esx_addons]/esx_lscustom/client/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[esx_addons]/esx_lscustom/client/main.lua b/[esx_addons]/esx_lscustom/client/main.lua index abf5242b6..237837c6d 100644 --- a/[esx_addons]/esx_lscustom/client/main.lua +++ b/[esx_addons]/esx_lscustom/client/main.lua @@ -382,7 +382,7 @@ CreateThread(function() local playerPed = PlayerPedId() if IsPedInAnyVehicle(playerPed, false) then - local coords = GetEntityCoords(PlayerPedId()) + local coords = GetEntityCoords(playerPed) local currentZone, zone, lastZone if (ESX.PlayerData.job and ESX.PlayerData.job.name == 'mechanic') or not Config.IsMechanicJobOnly then