Hello there, I’m searching for the function to show this type of text on my server. I just need the function itself (and everything related to its working ofc).
Here it is
Do you have any clues ?
Thanks !
Hello there, I’m searching for the function to show this type of text on my server. I just need the function itself (and everything related to its working ofc).
Here it is
Do you have any clues ?
Thanks !
Hey, here is a simple function that allows you to draw text on screen.
function Draw2DText(text)
SetTextFont(4)
SetTextProportional(1)
SetTextScale(0.5, 0.5)
SetTextColour(255, 0, 0, 255) -- Red color (or any color you choose)
SetTextDropShadow(0, 0, 0, 0, 255)
SetTextEdge(1, 0, 0, 0, 255)
SetTextDropShadow()
SetTextOutline()
SetTextEntry("STRING")
AddTextComponentString(text)
DrawText(0.45, 0.80) -- Adjust these values to move the text position
end
Draw2DText("Your text here")
I would strongly advise you don’t hardcode the color & position on screen like I did for this example. It would be best to pass those values as parameters of the Draw2DText function to make it more reusable & customizable. Hope this helps!