It seems like no matter what number is in DrawText(x, y), the text is always at the top left of the screen. I am trying to make the text appear in the middle of the players screen. Here is what I have:
local screenW, screenH = GetScreenResolution()
local height = 1080
local ratio = screenW/screenH
local width = height*ratio
SetTextFont(1)
SetTextProportional(1)
SetTextScale(0.0, 0.3)
SetTextColour(128, 128, 128, 255)
SetTextDropshadow(0, 0, 0, 0, 255)
SetTextEdge(1, 0, 0, 0, 150)
SetTextDropshadow()
SetTextOutline()
--SetTextCentre(1)
SetTextEntry("String")
AddTextComponentString("Press E to sell your vehicle!")
DrawText( width/2, 100 ) -- seems like no matter what numbers are in here, the text is always at the top left
I believe that script is for displaying text in certain areas of the map (the text gets smaller/larger depending on how far you are). I’m not trying to do something quite that complex, I just want the text to display in the middle of the players screen.
Hmm. I have similar stuff to this script. The thing is, mine should work, but it seems no matter what width and height I enter inside of DrawText(), it is still in the top left of my screen. I even tried DrawText(960, 540), which is the center of a 1080p monitor, and yet it still displays in the top left.