flag no longer hardcoded, also clean up some debug code
This commit is contained in:
1 parent
7bb58e4781
commit
d55c13ab31
2 files changed
+11
-57
No files matched your search
@@ -13,7 +13,7 @@ local function convertFromQB(options)
|
||||
model = prop1.model,
|
||||
bone = prop1.bone,
|
||||
pos = prop1.coords,
|
||||
rot = prop1.rotation,
|
||||
rot = prop1.rotation,
|
||||
},
|
||||
{
|
||||
model = prop2.model,
|
||||
@@ -22,8 +22,6 @@ local function convertFromQB(options)
|
||||
rot = prop2.rotation,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return {
|
||||
duration = options.duration,
|
||||
label = options.label,
|
||||
@@ -38,17 +36,18 @@ local function convertFromQB(options)
|
||||
},
|
||||
anim = {
|
||||
dict = options.animation?.animDict,
|
||||
clip = options.animation?.anim
|
||||
clip = options.animation?.anim,
|
||||
flag = options.animation?.flags or 49,
|
||||
},
|
||||
prop = props,
|
||||
}
|
||||
end
|
||||
|
||||
---comment
|
||||
---This function opens a progress bar.
|
||||
---@param options table
|
||||
---@param cb any
|
||||
---@param isQBInput boolean
|
||||
---@return nil
|
||||
---@return boolean
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function ProgressBar.Open(options, cb, isQBInput)
|
||||
if isQBInput then
|
||||
@@ -62,23 +61,4 @@ function ProgressBar.Open(options, cb, isQBInput)
|
||||
return success
|
||||
end
|
||||
|
||||
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)
|
||||
--]]
|
||||
return ProgressBar
|
||||
@@ -23,12 +23,12 @@ local function convertFromOx(options)
|
||||
animation = {
|
||||
animDict = options.anim?.dict,
|
||||
anim = options.anim?.clip,
|
||||
flags = 49
|
||||
flags = options.anim?.flag or 49
|
||||
},
|
||||
prop = {
|
||||
model = prop1.model,
|
||||
bone = prop1.bone,
|
||||
coords = prop1.pos,
|
||||
coords = prop1.pos,
|
||||
rotation = prop1.rot
|
||||
},
|
||||
propTwo = {
|
||||
@@ -40,11 +40,11 @@ local function convertFromOx(options)
|
||||
}
|
||||
end
|
||||
|
||||
---comment
|
||||
---This function opens a progress bar.
|
||||
---@param options table
|
||||
---@param cb any
|
||||
---@param qbFormat boolean
|
||||
---@return success boolean
|
||||
---@return boolean boolean
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
function ProgressBar.Open(options, cb, qbFormat)
|
||||
if not exports['progressbar'] then return false end
|
||||
@@ -60,30 +60,4 @@ function ProgressBar.Open(options, cb, qbFormat)
|
||||
return Citizen.Await(prom)
|
||||
end
|
||||
|
||||
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)
|
||||
--]]
|
||||
return ProgressBar
|
||||
Reference in new issue
Block a user