Text above ShopNPC


I’m trying to put a text above my npc, his name. But I don’t know how to do it :confused:

I try function ENT:Draw with cam.3d2d, but doesn’t work.

Someone know how to do that? thank.

Show us your attempted coding at it. You might have done something wrong.


[lua]function ENT:Draw()

cam.Start3D2D( Vector( 222, -73 , -100 ), Angle(0, 0, 0), 0.25 )
	draw.DrawText("AAAAAAAAAAA", "DermaLarge", 2, 2, Color(255, 255, 255, 255), TEXT_ALIGN_CENTER )



Stop bumping. Replace Vector( 222, -73 , -100 ) with self:GetPos() and look around your entity.

I bump because my thread was on the second pages…

And I replace Vector( 222, -73, -100 ) by Vector( self:GetPos() ) and doesn’t work…

I can help you ^^ Add me on steam reggae59


You’re so impatient… You’ll be lucky to get any help with the amount of patience you have…

I’m impatient because i’m stuck. I have to finish my gamemode and i’m really stuck on this bullshit…

I forgot to tell you, client functions are not called on NPCs. ( base_ai )

Personally, it would be alot easier to make a perma textscreen, but ok.

So, how I can have a text above my npc?

Using hooks?

And what hook I can use?


It’s not a hook lol

hook.Add(“PostDrawOpaqueRenderables”, “DrawNPCText”, function()

cam.Start3D2D( self:GetPos(), Angle(0, 0, 0), 0.25 )
draw.DrawText(“AAAAAAAAAAA”, “DermaLarge”, 2, 2, Color(255, 255, 255, 255), TEXT_ALIGN_CENTER )