mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 01:08:57 +00:00
Natives
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user