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