flag no longer hardcoded, also clean up some debug code
This commit is contained in:
1 parent
7bb58e4781
commit
d55c13ab31
2 files changed
+7
-53
No files matched your search
@@ -22,8 +22,6 @@ local function convertFromQB(options)
|
|||||||
rot = prop2.rotation,
|
rot = prop2.rotation,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
duration = options.duration,
|
duration = options.duration,
|
||||||
label = options.label,
|
label = options.label,
|
||||||
@@ -38,17 +36,18 @@ local function convertFromQB(options)
|
|||||||
},
|
},
|
||||||
anim = {
|
anim = {
|
||||||
dict = options.animation?.animDict,
|
dict = options.animation?.animDict,
|
||||||
clip = options.animation?.anim
|
clip = options.animation?.anim,
|
||||||
|
flag = options.animation?.flags or 49,
|
||||||
},
|
},
|
||||||
prop = props,
|
prop = props,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
---comment
|
---This function opens a progress bar.
|
||||||
---@param options table
|
---@param options table
|
||||||
---@param cb any
|
---@param cb any
|
||||||
---@param isQBInput boolean
|
---@param isQBInput boolean
|
||||||
---@return nil
|
---@return boolean
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function ProgressBar.Open(options, cb, isQBInput)
|
function ProgressBar.Open(options, cb, isQBInput)
|
||||||
if isQBInput then
|
if isQBInput then
|
||||||
@@ -63,22 +62,3 @@ function ProgressBar.Open(options, cb, isQBInput)
|
|||||||
end
|
end
|
||||||
|
|
||||||
return ProgressBar
|
return ProgressBar
|
||||||
|
|
||||||
--[[
|
|
||||||
RegisterCommand("progressbar", function()
|
|
||||||
ProgressBar.Open({
|
|
||||||
duration = 5000,
|
|
||||||
label = "Searching",
|
|
||||||
disable = {
|
|
||||||
move = true,
|
|
||||||
combat = true
|
|
||||||
},
|
|
||||||
anim = {
|
|
||||||
dict = "anim@amb@clubhouse@tutorial@bkr_tut_ig3@",
|
|
||||||
clip = "machinic_loop_mechandplayer"
|
|
||||||
}
|
|
||||||
}, function(cancelled)
|
|
||||||
print(cancelled and "Cancelled" or "Complete")
|
|
||||||
end)
|
|
||||||
end)
|
|
||||||
--]]
|
|
||||||
@@ -23,7 +23,7 @@ local function convertFromOx(options)
|
|||||||
animation = {
|
animation = {
|
||||||
animDict = options.anim?.dict,
|
animDict = options.anim?.dict,
|
||||||
anim = options.anim?.clip,
|
anim = options.anim?.clip,
|
||||||
flags = 49
|
flags = options.anim?.flag or 49
|
||||||
},
|
},
|
||||||
prop = {
|
prop = {
|
||||||
model = prop1.model,
|
model = prop1.model,
|
||||||
@@ -40,11 +40,11 @@ local function convertFromOx(options)
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
---comment
|
---This function opens a progress bar.
|
||||||
---@param options table
|
---@param options table
|
||||||
---@param cb any
|
---@param cb any
|
||||||
---@param qbFormat boolean
|
---@param qbFormat boolean
|
||||||
---@return success boolean
|
---@return boolean boolean
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function ProgressBar.Open(options, cb, qbFormat)
|
function ProgressBar.Open(options, cb, qbFormat)
|
||||||
if not exports['progressbar'] then return false end
|
if not exports['progressbar'] then return false end
|
||||||
@@ -61,29 +61,3 @@ function ProgressBar.Open(options, cb, qbFormat)
|
|||||||
end
|
end
|
||||||
|
|
||||||
return ProgressBar
|
return ProgressBar
|
||||||
|
|
||||||
|
|
||||||
-- Example usage:
|
|
||||||
--[[
|
|
||||||
RegisterCommand("progressbar", function()
|
|
||||||
ProgressBar.Open({
|
|
||||||
duration = 5000,
|
|
||||||
label = "Searching",
|
|
||||||
disable = {
|
|
||||||
move = true,
|
|
||||||
combat = true
|
|
||||||
},
|
|
||||||
anim = {
|
|
||||||
dict = "anim@amb@clubhouse@tutorial@bkr_tut_ig3@",
|
|
||||||
clip = "machinic_loop_mechandplayer"
|
|
||||||
},
|
|
||||||
prop = {
|
|
||||||
model = "prop_ar_arrow_3",
|
|
||||||
pos = vector3(0.0, 0.0, 0.0),
|
|
||||||
rot = vector3(0.0, 0.0, 0.0)
|
|
||||||
},
|
|
||||||
}, function(cancelled)
|
|
||||||
print(cancelled and "Cancelled" or "Complete")
|
|
||||||
end)
|
|
||||||
end)
|
|
||||||
--]]
|
|
||||||
Reference in new issue
Block a user