diff --git a/resource/interface/client/progress.lua b/resource/interface/client/progress.lua index f31c4ab..43779b6 100644 --- a/resource/interface/client/progress.lua +++ b/resource/interface/client/progress.lua @@ -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