RegisterNetEvent('wasabi_ambulance:heal', function(full, quiet)
local ped = wsb.cache.ped
local maxHealth = 200
if not full then
local health = GetEntityHealth(ped)
local newHealth = math.min(maxHealth, math.floor(health + maxHealth / 8))
SetEntityHealth(ped, newHealth + 0.0)
else
SetEntityHealth(ped, maxHealth + 0.0)
if wsb.framework == 'qb' then
TriggerServerEvent('hospital:server:resetHungerThirst')
TriggerServerEvent('hud:server:RelieveStress', 100)
end
end
if Config.MythicHospital then
TriggerEvent('mythic_hospital:client:RemoveBleed')
TriggerEvent('mythic_hospital:client:ResetLimbs')
end
if Config.EnableLiveInjury and full then ClearPatientSymptoms() end
if not quiet then
TriggerEvent('wasabi_bridge:notify', Strings.player_successful_heal, Strings.player_healed_desc, 'success')
end
if Config.EMSItems.heal.healBleed and next(PlayerInjury) then
for _, injury in pairs(PlayerInjury) do
if injury.data.bleed > 0 then
injury.data.bleed = 0
end
end
TriggerServerEvent('wasabi_ambulance:injurySync', PlayerInjury)
end
end)