Skip to content

Commit 169c06c

Browse files
feat: isWatchCarjackingAttemptsRunning flag
1 parent 5be1faa commit 169c06c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

client/main.lua

+4
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,10 @@ local function toggleEngine()
294294
end
295295
end
296296

297+
local isWatchCarjackingAttemptsRunning = false
297298
local function watchCarjackingAttempts()
299+
if isWatchCarjackingAttemptsRunning then return end
300+
isWatchCarjackingAttemptsRunning = true
298301
CreateThread(function()
299302
while cache.weapon do
300303
if isCarjackingAvailable then
@@ -330,6 +333,7 @@ local function watchCarjackingAttempts()
330333
Wait(100)
331334
end
332335
end)
336+
isWatchCarjackingAttemptsRunning = false
333337
end
334338

335339
-----------------------

0 commit comments

Comments
 (0)