Bandage & Medkit animations upon usage, closes #116

This commit is contained in:
ElPumpo
2019-02-24 12:44:06 +01:00
parent ea6c31f1d9
commit 7b614c3c7b
3 changed files with 59 additions and 12 deletions
+4 -2
View File
@@ -907,7 +907,7 @@ function WarpPedInClosestVehicle(ped)
end
RegisterNetEvent('esx_ambulancejob:heal')
AddEventHandler('esx_ambulancejob:heal', function(healType)
AddEventHandler('esx_ambulancejob:heal', function(healType, quiet)
local playerPed = PlayerPedId()
local maxHealth = GetEntityMaxHealth(playerPed)
@@ -919,5 +919,7 @@ AddEventHandler('esx_ambulancejob:heal', function(healType)
SetEntityHealth(playerPed, maxHealth)
end
ESX.ShowNotification(_U('healed'))
if not quiet then
ESX.ShowNotification(_U('healed'))
end
end)