From cd271356d95e13e7c680092040b57f4b9dd62197 Mon Sep 17 00:00:00 2001 From: abdel1touimi Date: Tue, 12 Mar 2024 16:50:48 +0000 Subject: [PATCH] add allowSwimming to allow the progress bar to continue while swimming, or cancel if set to false/nil(default) --- resource/interface/client/progress.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resource/interface/client/progress.lua b/resource/interface/client/progress.lua index 6f43d08e4..ac760cead 100644 --- a/resource/interface/client/progress.lua +++ b/resource/interface/client/progress.lua @@ -17,6 +17,7 @@ local playerState = LocalPlayer.state ---@field allowRagdoll? boolean ---@field allowCuffed? boolean ---@field allowFalling? boolean +---@field allowSwimming? boolean ---@field canCancel? boolean ---@field anim? { dict?: string, clip: string, flag?: number, blendIn?: number, blendOut?: number, duration?: number, playbackRate?: number, lockX?: boolean, lockY?: boolean, lockZ?: boolean, scenario?: string, playEnter?: boolean } ---@field prop? ProgressPropProps | ProgressPropProps[] @@ -38,6 +39,7 @@ local function interruptProgress(data) if not data.allowRagdoll and IsPedRagdoll(cache.ped) then return true end if not data.allowCuffed and IsPedCuffed(cache.ped) then return true end if not data.allowFalling and IsPedFalling(cache.ped) then return true end + if not data.allowSwimming and IsPedSwimming(cache.ped) then return true end end local isFivem = cache.game == 'fivem'