mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-28 17:01:14 +00:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user