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()