From 1b75d9cf5443b410b7fd493855490e1cc8cc7633 Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Mon, 31 May 2021 04:04:27 +1000 Subject: [PATCH] refactor(client/functions): Remove rect from DrawText3D It doesn't scale well with different fonts and text size - was only recently added and has not worked correctly --- client/functions.lua | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/client/functions.lua b/client/functions.lua index e8479cc5..80b6a34b 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -706,7 +706,7 @@ ESX.Game.SetVehicleProperties = function(vehicle, props) end end -ESX.Game.Utils.DrawText3D = function(coords, text, size, font, rect) +ESX.Game.Utils.DrawText3D = function(coords, text, size, font) local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z) local camCoords = GetGameplayCamCoords() @@ -728,10 +728,6 @@ ESX.Game.Utils.DrawText3D = function(coords, text, size, font, rect) AddTextComponentString(text) SetDrawOrigin(vector.xyz, 0) DrawText(0.0, 0.0) - if rect then - local length = string.len(text:gsub('~.-~', ''))/13.5 - DrawRect(0.0, 0.18 / distance, length / distance, 0.04 * scale , 0,0,0, 75) - end ClearDrawOrigin() end