Update functions.lua
This commit is contained in:
1 parent
26e5f29343
commit
8690348917
1 file changed
+9
-4
@@ -9,18 +9,20 @@ function progressbar(text, time, anim)
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {anim})
|
||||
if progressbartype == 'oxbar' then
|
||||
if lib.progressBar({ duration = time, label = text, useWhileDead = false, canCancel = true, disable = { car = true, move = true},}) then
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
if GetResourceState('scully_emotemenu') == 'started' then
|
||||
exports.scully_emotemenu:cancelEmote()
|
||||
else
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
return true
|
||||
end
|
||||
elseif progressbartype == 'oxcir' then
|
||||
if lib.progressCircle({ duration = time, label = text, useWhileDead = false, canCancel = true, position = 'bottom', disable = { car = true,move = true},}) then
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
if GetResourceState('scully_emotemenu') == 'started' then
|
||||
exports.scully_emotemenu:cancelEmote()
|
||||
end
|
||||
else
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
return true
|
||||
end
|
||||
elseif progressbartype == 'qb' then
|
||||
@@ -29,14 +31,17 @@ function progressbar(text, time, anim)
|
||||
QBCore.Functions.Progressbar("drink_something", text, time, false, true, { disableMovement = true, disableCarMovement = true, disableMouse = false, disableCombat = true, disableInventory = true,
|
||||
}, {}, {}, {}, function()-- Done
|
||||
test = true
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
if GetResourceState('scully_emotemenu') == 'started' then
|
||||
exports.scully_emotemenu:cancelEmote()
|
||||
else
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
end, function()
|
||||
cancelled = true
|
||||
if GetResourceState('scully_emotemenu') == 'started' then
|
||||
exports.scully_emotemenu:cancelEmote()
|
||||
else
|
||||
TriggerEvent('animations:client:EmoteCommandStart', {"c"})
|
||||
end
|
||||
end)
|
||||
repeat
|
||||
|
||||
Reference in new issue
Block a user