From 485dc685f2f10d3b48084a84a9cba00fd804df14 Mon Sep 17 00:00:00 2001 From: Jeffrey-Lang <34451211+Jeffrey-Lang@users.noreply.github.com> Date: Sun, 4 Nov 2018 21:27:34 +0100 Subject: [PATCH] Fixed respawning with /revive (#87) - Fix spawning at hostiptal with /revive command or revive by ems menu - Now correctly repawning to hospital after bleedoutTimer runs out --- client/main.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client/main.lua b/client/main.lua index 0141e83b..5b834543 100644 --- a/client/main.lua +++ b/client/main.lua @@ -209,6 +209,7 @@ function StartDeathTimer() text = text .. _U('respawn_bleedout_prompt') if IsControlPressed(0, Keys['E']) and timeHeld > 60 then + RemoveItemsAfterRPDeath() break end elseif Config.EarlyRespawnFine and canPayFine then @@ -216,6 +217,7 @@ function StartDeathTimer() if IsControlPressed(0, Keys['E']) and timeHeld > 60 then TriggerServerEvent('esx_ambulancejob:payFine') + RemoveItemsAfterRPDeath() break end end @@ -232,8 +234,10 @@ function StartDeathTimer() AddTextComponentString(text) DrawText(0.5, 0.8) end - - RemoveItemsAfterRPDeath() + + if bleedoutTimer < 1 and IsDead then + RemoveItemsAfterRPDeath() + end end) end