Add support for 17mov progressbars

This commit is contained in:
Jim Shield
2025-10-09 20:12:05 +01:00
parent 98f8944a79
commit a13284d0e0

View File

@@ -206,6 +206,52 @@ local progressFunc = {
exports.jim_bridge:stopProgressBar() exports.jim_bridge:stopProgressBar()
end, end,
}, },
["17mov"] = {
start =
function(data)
if exports["17mov_Hud"]:StartProgress({
duration = debugMode and 1000 or data.time,
label = data.label,
useWhileDead = data.dead or false,
canCancel = data.cancel or true,
controlDisables = {
disableMovement = data.disableMovement or false,
disableCarMovement = data.disableMovement or false,
disableMouse = data.mouse or false,
disableCombat = data.combat or true,
},
animation = {
animDict = data.dict,
anim = data.anim,
flags = (data.flag == 8 and 32 or data.flag) or nil,
task = data.task,
},
prop = data.prop and {
model = data.prop.model,
bone = data.prop.bone or 0,
coords = data.prop.pos or vec3(0, 0, 0),
rotation = data.prop.rot or vec3(0, 0, 0),
} or nil,
propTwo = data.propTwo and {
model = data.propTwo.model,
bone = data.propTwo.bone or 0,
coords = data.propTwo.pos or vec3(0, 0, 0),
rotation = data.propTwo.rot or vec3(0, 0, 0),
} or nil,
}, nil, nil) then
return true
else
return false
end
end,
stop =
function()
exports["17mov_Hud"]:StopProgress()
end,
},
} }
--- Displays a progress bar using the configured progress bar system. --- Displays a progress bar using the configured progress bar system.