feat(client/progress): disable sprinting (#473)

This commit is contained in:
iSentrie
2023-12-24 07:09:12 +02:00
committed by GitHub
parent be55ef8d85
commit 4c8b3a8636

View File

@@ -20,7 +20,7 @@ local playerState = LocalPlayer.state
---@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[]
---@field disable? { move?: boolean, car?: boolean, combat?: boolean, mouse?: boolean } ---@field disable? { move?: boolean, sprint?: boolean, car?: boolean, combat?: boolean, mouse?: boolean }
local function createProp(prop) local function createProp(prop)
lib.requestModel(prop.model) lib.requestModel(prop.model)
@@ -105,6 +105,10 @@ local function startProgress(data)
DisableControlAction(0, controls.INPUT_DUCK, true) DisableControlAction(0, controls.INPUT_DUCK, true)
end end
if disable.sprint and not disable.move then
DisableControlAction(0, controls.INPUT_SPRINT, true)
end
if disable.car then if disable.car then
DisableControlAction(0, controls.INPUT_VEH_MOVE_LEFT_ONLY, true) DisableControlAction(0, controls.INPUT_VEH_MOVE_LEFT_ONLY, true)
DisableControlAction(0, controls.INPUT_VEH_MOVE_RIGHT_ONLY, true) DisableControlAction(0, controls.INPUT_VEH_MOVE_RIGHT_ONLY, true)