From 930c1e5518547c0df5b24047087f5ac1a6b85b7d Mon Sep 17 00:00:00 2001 From: Mustache Dom <123716453+Mustachedom@users.noreply.github.com> Date: Sat, 29 Jun 2024 13:18:27 -0700 Subject: [PATCH] Update functions.lua --- client/functions.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/client/functions.lua b/client/functions.lua index f59e4de..424d043 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -10,11 +10,17 @@ local dispatch = Config.Dispatch 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 + 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 return true end elseif progressbartype == 'qb' then @@ -24,8 +30,14 @@ local dispatch = Config.Dispatch }, {}, {}, {}, function()-- Done test = true TriggerEvent('animations:client:EmoteCommandStart', {"c"}) + if GetResourceState('scully_emotemenu') == 'started' then + exports.scully_emotemenu:cancelEmote + end end, function() cancelled = true + if GetResourceState('scully_emotemenu') == 'started' then + exports.scully_emotemenu:cancelEmote + end end) repeat Wait(100)