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

This commit is contained in:
Abdelouahed TOUIMI
2024-03-15 17:34:11 +00:00
committed by GitHub
parent 50d957c1d1
commit abb2868bae

View File

@@ -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'