config.client.lua

Preview File Updated: v1.0.3 - 03/03/2025

CL = {}

CL.DrawText3D = function(coords, text, textScale)
    local textScale = textScale or 0.45
    local camCoords = GetFinalRenderedCamCoord()
    local distance = #(coords.xyz - camCoords)
    local scale = (textScale / distance) * 2
    local fov = (1 / GetGameplayCamFov()) * 100
    scale = scale * fov
    SetTextScale(0.0 * scale, 0.55 * scale)
    SetTextFont(4)
    SetTextDropShadow()
    SetTextOutline()
    SetTextProportional(1)
    SetTextColour(255, 255, 255, 215)
    SetTextEntry("STRING")
    SetTextCentre(true)
    AddTextComponentString(text)
    SetDrawOrigin(coords.x, coords.y, coords.z, 0)
    DrawText(0.0, 0.0)
    ClearDrawOrigin()
end

RegisterNetEvent("esx_ambulancejob:revive", function()
    resetDeathReason()
end)

AddEventHandler("hospital:client:Revive", function()
    resetDeathReason()
end)

Last updated

Was this helpful?