From 3b7972506b81368c5433ce956780e58a95650ca5 Mon Sep 17 00:00:00 2001 From: Manason Date: Thu, 31 Oct 2024 02:03:17 -0700 Subject: [PATCH] fix(client/laststand): counting down at double speed (#102) --- client/laststand.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/laststand.lua b/client/laststand.lua index cbde87b..ca3193e 100644 --- a/client/laststand.lua +++ b/client/laststand.lua @@ -59,8 +59,12 @@ local function countdownLastStand() end end +local startLastStandLock = false + ---put player in last stand mode and notify EMS. function StartLastStand(attacker, weapon) + if startLastStandLock then return end + startLastStandLock = true TriggerEvent('ox_inventory:disarm', cache.playerId, true) WaitForPlayerToStopMoving() TriggerServerEvent('InteractSound_SV:PlayOnSource', 'demo', 0.1) @@ -83,7 +87,8 @@ function StartLastStand(attacker, weapon) PlayLastStandAnimation() Wait(0) end + startLastStandLock = false end) end -exports('StartLastStand', StartLastStand) \ No newline at end of file +exports('StartLastStand', StartLastStand)