feat(interface/progress): add allowSwimming option (#516)

This commit is contained in:
Abdelouahed TOUIMI authored and GitHub committed 2024-03-16 04:34:11 +11:00
1 parent 50d957c1d1
commit abb2868bae
1 file changed
+2
+2
View File
@@ -17,6 +17,7 @@ local playerState = LocalPlayer.state
---@field allowRagdoll? boolean ---@field allowRagdoll? boolean
---@field allowCuffed? boolean ---@field allowCuffed? boolean
---@field allowFalling? boolean ---@field allowFalling? boolean
---@field allowSwimming? boolean
---@field canCancel? 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 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[] ---@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.allowRagdoll and IsPedRagdoll(cache.ped) then return true end
if not data.allowCuffed and IsPedCuffed(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.allowFalling and IsPedFalling(cache.ped) then return true end
if not data.allowSwimming and IsPedSwimming(cache.ped) then return true end
end end
local isFivem = cache.game == 'fivem' local isFivem = cache.game == 'fivem'