• We just launched and are currently in beta. Join us as we build and grow the community.

FiveM - Draw3DText

SuperGoku

Data Sharding Expert
S Rep
0
0
0
Rep
0
S Vouches
0
0
0
Vouches
0
Posts
117
Likes
148
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 300 XP
Just a function and how to call, Thought I would share because alot of people would like to know how servers have this so here you go.
Code:
function DrawText3D(x,y,z, text)
local onScreen,_x,_y=World3dToScreen2d(x,y,z)
local px,py,pz=table.unpack(GetGameplayCamCoords())
SetTextScale(0.35, 0.35)
SetTextFont(4)
SetTextProportional(1)
SetTextColour(255, 255, 255, 215)
SetTextEntry("STRING")
SetTextCentre(1)
AddTextComponentString(text)
DrawText(_x,_y)
local factor = (string.len(text)) / 370
DrawRect(_x,_y+0.0125, 0.015+ factor, 0.03, 41, 11, 41, 68)
end
Call the function.
Code:
DrawText3D(0,0,0,'Armoured on nulled.to') // XYZ coordinates then the message you want to display.
 

436,285

314,309

314,318

Top