Merge pull request #1845 from seltonmt012/fix/points-loop-once

fix(esx_lib/points): start the points loop only once
This commit is contained in:
_Not_
2026-08-14 19:37:02 -05:00
committed by GitHub
+7
View File
@@ -4,6 +4,7 @@ xLib.points = {}
local points = {}
local insidePoints = {}
local handleCount = 0
local loopStarted = false
---@param coords vector3
---@param distance number
@@ -44,6 +45,12 @@ function xLib.points.hide(handle, hidden)
end
function xLib.points.startLoop()
if loopStarted then
return
end
loopStarted = true
CreateThread(function()
local lastScan = 0