Hello I am coding the Elite Roleplay server and I am having this problem. The text is on the side, doesn't matter if I change the x coordinate. Here is the code:
[lua]
include("shared.lua")
function ENT:Initialize()
end
function ENT:Draw()
self:DrawModel()
self:SetColor( Color(47, 175, 35) )
local Pos = self:GetPos()
local Ang = self:GetAngles()
local owner = self:GetOwner()
owner = self:GetOwner()
surface.SetFont("HUDNumber5")
local text = "Health Charger"
local TextWidth = 10
local TextWidth2 = 20
Ang:RotateAroundAxis(Ang:Up(), 90)
cam.Start3D2D(Pos + Ang:Up() * 11.5, Ang, 0.11)
draw.WordBox(2, TextWidth2, -30, text, "HUDNumber5", Color(140, 0, 0, 100), Color(255,255,255,255))
cam.End3D2D()
end
[/lua]
Here is a photo of how it looks like: [url]http://steamcommunity.com/sharedfiles/filedetails/?id=348133707[/url]
If you find the fix please help me out.
Bump. Please help.
I dont know, ive never worked with 3d2d shit,
but maybe try an alignment, (like TEXT_ALIGN_CENTER or something.)
Doubt it would work though..
Sorry, you need to Log In to post a reply to this thread.