• Name tags above head?
    0 replies, posted
I'm not too sure where I'm going wrong exactly here, i've a feeling I've done it all wrong but nothing seems to happen upon execution... [code] local function init() surface.CreateFont('Fontlaroy', { font = 'coolvetica', size = 64 }) print( "Initialization hook called" ) end hook.Add( "Initialize", "font_maker", init ) function StatusDraw(ply) local MaxLength = 32 if not ply:Alive() then return end if not ply:IsValid() then return end if ply.IsSpec then return end local offset = Vector(0, 0, 79) local ang = LocalPlayer():EyeAngles() local pos = ply:GetPos() + offset + ang:Up() ang:RotateAroundAxis(ang:Forward(), 90) ang:RotateAroundAxis(ang:Right(), 90) cam.Start3D2D(pos, Angle(0, ang.y, 90), 0.1) draw.DrawText(string.sub(ply:Nick(), 1, MaxLength), "Fontlaroy", 2, 2, Color(180, 0, 0, 255), TEXT_ALIGN_CENTER) cam.End3D2D() end hook.Add( "PostPlayerDraw", "texthead", StatusDraw ) [/code]
Sorry, you need to Log In to post a reply to this thread.