Skip to content

Commit

Permalink
fix(client/laststand): counting down at double speed (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
Manason authored Oct 31, 2024
1 parent 1065032 commit 3b79725
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion client/laststand.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -83,7 +87,8 @@ function StartLastStand(attacker, weapon)
PlayLastStandAnimation()
Wait(0)
end
startLastStandLock = false
end)
end

exports('StartLastStand', StartLastStand)
exports('StartLastStand', StartLastStand)

0 comments on commit 3b79725

Please sign in to comment.