mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-19 06:46:04 +01:00
Commit[progressBar]: ox progress options
- Added ability to choose circle/bar type - Added ability for props when using progbar
This commit is contained in:
@@ -43,9 +43,10 @@ function progressBar(data)
|
|||||||
local result = nil
|
local result = nil
|
||||||
if data.cam then startTempCam(data.cam) end
|
if data.cam then startTempCam(data.cam) end
|
||||||
if Config.System.ProgressBar == "ox" then
|
if Config.System.ProgressBar == "ox" then
|
||||||
if exports[OXLibExport]:progressBar({
|
local options = {
|
||||||
duration = debugMode and 1000 or data.time,
|
duration = debugMode and 1000 or data.time,
|
||||||
label = data.label,
|
label = data.label,
|
||||||
|
position = data.position or "bottom",
|
||||||
useWhileDead = data.dead or false,
|
useWhileDead = data.dead or false,
|
||||||
canCancel = data.cancel and data.cancel or true,
|
canCancel = data.cancel and data.cancel or true,
|
||||||
anim = {
|
anim = {
|
||||||
@@ -55,14 +56,34 @@ function progressBar(data)
|
|||||||
scenario = data.task
|
scenario = data.task
|
||||||
},
|
},
|
||||||
disable = {
|
disable = {
|
||||||
combat = true
|
combat = data.combat or true,
|
||||||
|
move = data.movement or false,
|
||||||
|
car = data.carMovement or false,
|
||||||
|
mouse = data.mouse or false
|
||||||
},
|
},
|
||||||
}) then
|
}
|
||||||
result = true
|
if data.prop and data.prop.model then
|
||||||
else
|
options.prop = {
|
||||||
result = false
|
model = data.prop.model,
|
||||||
|
pos = data.prop.pos or vec3(0, 0, 0),
|
||||||
|
rot = data.prop.rot or vec3(0, 0, 0),
|
||||||
|
bone = data.prop.bone or 0
|
||||||
|
}
|
||||||
end
|
end
|
||||||
|
if data.propTwo and data.propTwo.model then
|
||||||
|
options.propTwo = {
|
||||||
|
model = data.propTwo.model,
|
||||||
|
pos = data.propTwo.pos or vec3(0, 0, 0),
|
||||||
|
rot = data.propTwo.rot or vec3(0, 0, 0),
|
||||||
|
bone = data.propTwo.bone or 0
|
||||||
|
}
|
||||||
|
end
|
||||||
|
if data.progressType == "circle" then result = exports[OXLibExport]:progressCircle(options)
|
||||||
|
elseif data.progressType == "bar" then result = exports[OXLibExport]:progressBar(options)
|
||||||
|
else
|
||||||
|
result = exports[OXLibExport]:progressBar(options)
|
||||||
|
end
|
||||||
|
return result
|
||||||
elseif Config.System.ProgressBar == "qb" then
|
elseif Config.System.ProgressBar == "qb" then
|
||||||
Core.Functions.Progressbar("progbar",
|
Core.Functions.Progressbar("progbar",
|
||||||
data.label,
|
data.label,
|
||||||
|
|||||||
Reference in New Issue
Block a user