From 7314e8453f5ad15eaf26b3b43b24e1aa6cb3adc8 Mon Sep 17 00:00:00 2001 From: Kakarot <57848836+GhzGarage@users.noreply.github.com> Date: Sat, 23 Sep 2023 15:35:54 -0500 Subject: [PATCH] Natives --- client/functions.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/client/functions.lua b/client/functions.lua index 7ec0bad..edba745 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -23,9 +23,9 @@ function QBCore.Functions.DrawText(x, y, width, height, scale, r, g, b, a, text) SetTextFont(4) SetTextScale(scale, scale) SetTextColour(r, g, b, a) - SetTextEntry('STRING') - AddTextComponentString(text) - DrawText(x - width / 2, y - height / 2 + 0.005) + BeginTextCommandDisplayText('STRING') + AddTextComponentSubstringPlayerName(text) + EndTextCommandDisplayText(x - width / 2, y - height / 2 + 0.005) end function QBCore.Functions.DrawText3D(x, y, z, text) @@ -34,11 +34,11 @@ function QBCore.Functions.DrawText3D(x, y, z, text) SetTextFont(4) SetTextProportional(1) SetTextColour(255, 255, 255, 215) - SetTextEntry('STRING') + BeginTextCommandDisplayText('STRING') SetTextCentre(true) - AddTextComponentString(text) + AddTextComponentSubstringPlayerName(text) SetDrawOrigin(x, y, z, 0) - DrawText(0.0, 0.0) + EndTextCommandDisplayText(0.0, 0.0) local factor = (string.len(text)) / 370 DrawRect(0.0, 0.0 + 0.0125, 0.017 + factor, 0.03, 0, 0, 0, 75) ClearDrawOrigin()