This commit is contained in:
Kakarot
2023-09-23 15:35:54 -05:00
parent 5a7f41fbec
commit 7314e8453f
+6 -6
View File
@@ -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()