From 4000e1eb34e5779c3020db2e91843da85b45efc7 Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Sun, 6 Oct 2019 20:29:21 +0200 Subject: [PATCH] Added DrawText3D() optional font argument --- client/functions.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/functions.lua b/client/functions.lua index 726c7311..a167c934 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -983,20 +983,21 @@ ESX.Game.SetVehicleProperties = function(vehicle, props) end end -ESX.Game.Utils.DrawText3D = function(coords, text, size) +ESX.Game.Utils.DrawText3D = function(coords, text, size, font) coords = vector3(coords.x, coords.y, coords.z) local camCoords = GetGameplayCamCoords() local distance = #(coords - camCoords) if not size then size = 1 end + if not font then font = 0 end local scale = (size / distance) * 2 local fov = (1 / GetGameplayCamFov()) * 100 scale = scale * fov SetTextScale(0.0 * scale, 0.55 * scale) - SetTextFont(0) + SetTextFont(font) SetTextColour(255, 255, 255, 255) SetTextDropshadow(0, 0, 0, 0, 255) SetTextDropShadow()