• We have a new discord! click here to join
    Any faulty links ? Report them in our discord or via our Ticket System!
    We do everything we can to protect the safety of our visitors, if any resource contains malware in any kind of form or obfuscation please report it aswell ♡♡

3D Text (1 Viewer)

  • Post hidden due to user being banned.

suprimeet

Well-known member
Oct 19, 2021
207
55
28
Credits
1,552
Citizen.CreateThread(function()
while true do
Citizen.Wait(1)
local player = PlayerPedId()
local coords = GetEntityCoords(player)
local coords_plus = vector3(coords.x, coords.y, coords.z+1.2)
local r = 58
local g = 115
local b = 208
local a = 215
local my_string = "My text over head"
DrawText3D(coords_plus,my_string,scale_x,scale_y,r,g,b,a)
end
end)

function DrawText3D(coords, text, scale_x, scale_y, r, g, b, a)
local onScreen,_x,_y = World3dToScreen2d(coords)
local game_coords = GetGameplayCamCoord()
local dist = #(game_coords - coords)

local scale = (1/dist)*2
local fov = (1/GetGameplayCamFov())*100
local scale = scale*fov

if onScreen then
SetTextScale(scale_x, scale_y)
SetTextFont(4)
SetTextProportional(1)
SetTextColour(r, g, b, a)
SetTextEntry("STRING")
SetTextCentre(1)
SetTextOutline()
AddTextComponentString(text)
DrawText(_x,_y)
end
end
??
 

Users who are viewing this thread

Top