From ed6904358aa57b7a616ed185bbb69d56103c8f2e Mon Sep 17 00:00:00 2001 From: xSL0W Date: Tue, 1 Jul 2025 00:02:54 +0300 Subject: [PATCH] fix(client/interface): fix longer progess bars fails because of NUI and GetGameTimer() desync --- resource/interface/client/progress.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resource/interface/client/progress.lua b/resource/interface/client/progress.lua index 5ab1c345d..257324053 100644 --- a/resource/interface/client/progress.lua +++ b/resource/interface/client/progress.lua @@ -150,7 +150,8 @@ local function startProgress(data) end playerState.invBusy = false - local duration = progress ~= false and GetGameTimer() - startTime + 100 -- give slight leeway + local timeOffset = (data.duration / 1000) * 20 -- try to match NUI duration with the game timer as quick fix + local duration = progress ~= false and (GetGameTimer() - startTime + timeOffset) or 0 if progress == false or duration <= data.duration then SendNUIMessage({ action = 'progressCancel' })