mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-01 02:38:53 +00:00
Much better revive animation
This commit is contained in:
+11
-4
@@ -62,7 +62,7 @@ function OpenMobileAmbulanceActionsMenu()
|
||||
|
||||
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
|
||||
|
||||
if closestPlayer == -1 or closestDistance > 3.0 then
|
||||
if closestPlayer == -1 or closestDistance > 1.0 then
|
||||
ESX.ShowNotification(_U('no_players'))
|
||||
else
|
||||
|
||||
@@ -77,9 +77,16 @@ function OpenMobileAmbulanceActionsMenu()
|
||||
|
||||
IsBusy = true
|
||||
ESX.ShowNotification(_U('revive_inprogress'))
|
||||
TaskStartScenarioInPlace(playerPed, 'CODE_HUMAN_MEDIC_TEND_TO_DEAD', 0, true)
|
||||
Citizen.Wait(10000)
|
||||
ClearPedTasks(playerPed)
|
||||
|
||||
local lib, anim = 'mini@cpr@char_a@cpr_str', 'cpr_pumpchest'
|
||||
|
||||
for i=1, 15, 1 do
|
||||
Citizen.Wait(900)
|
||||
|
||||
ESX.Streaming.RequestAnimDict(lib, function()
|
||||
TaskPlayAnim(PlayerPedId(), lib, anim, 8.0, -8.0, -1, 0, 0, false, false, false)
|
||||
end)
|
||||
end
|
||||
|
||||
TriggerServerEvent('esx_ambulancejob:removeItem', 'medikit')
|
||||
TriggerServerEvent('esx_ambulancejob:revive', GetPlayerServerId(closestPlayer))
|
||||
|
||||
@@ -83,7 +83,6 @@ function OnPlayerDeath()
|
||||
StartDeathTimer()
|
||||
StartDistressSignal()
|
||||
|
||||
ClearPedTasksImmediately(PlayerPedId())
|
||||
StartScreenEffect('DeathFailOut', 0, false)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user