Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(client/laststand): counting down at double speed #102

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)