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
This commit is contained in:
Jeffrey-Lang
2018-11-04 21:27:34 +01:00
committed by Samuel
parent db3e45ce32
commit 485dc685f2
+6 -2
View File
@@ -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