mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 06:56:03 +01:00
refactor(client/progress): minor adjustment to duration check
This commit is contained in:
@@ -142,18 +142,13 @@ local function startProgress(data)
|
||||
end
|
||||
|
||||
playerState.invBusy = false
|
||||
local duration = progress ~= false and GetGameTimer() - startTime + 100 -- give slight leeway
|
||||
|
||||
if progress == false then
|
||||
if progress == false or duration <= data.duration then
|
||||
SendNUIMessage({ action = 'progressCancel' })
|
||||
return false
|
||||
end
|
||||
|
||||
local actualDuration = GetGameTimer() - startTime + 100 -- give slight leeway
|
||||
|
||||
if actualDuration <= data.duration then
|
||||
return false
|
||||
end
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user