Better DrawText3D (snippet)

Code: Fivem Better DrawText3D (github.com)

qb-core edit

  1. Open qb-core/client/functions.lua
  2. find this function function QBCore.Functions.DrawText3D(x, y, z, text)
  3. Replace with the following code
function QBCore.Functions.DrawText3D(x, y, z, text)
    DrawText3D({
        text = text,
        coords = vector3(x, y, z)
    })
end
  1. Add the codes in the DrawText3D.lua file to the QBCore.Functions.DrawText3D function

Result

es_extended edit

  1. Open es_extended/client/functions.lua
  2. find this function ESX.Game.Utils.DrawText3D(coords, text, size, font)
  3. Replace with the following code
function ESX.Game.Utils.DrawText3D(coords, text, size, font)
    DrawText3D({
        text = text,
        coords = coords.xyz
    })
end
  1. Add the codes in the DrawText3D.lua file (above) to the ESX.Game.Utils.DrawText3D function

Result

7 Likes

Very smart thanks for sharing with us <3

1 Like

Thank you for sharing this with us! :heart:

1 Like

Good job thanks you for sharing

1 Like