Hello still having trouble with npcs ive made progress

Hello i made a thread about 4 days ago about the same problem adding a name above an npc. im still having trouble i have this code witch is ‘NOT’ mine from a different thread.

[lua]
surface.CreateFont( “coolvetica”, 64, 500, true, false, “Text64” )
function GM:PostDrawOpaqueRenderables()
for _, ent in pairs(ents.FindByClass(“npcclass”)) do
cam.Start3D2D(ent:GetPos()+Vector(0,0,90), ent:GetAngles() + Angle(0,90,90), 0.1)
draw.SimpleText(“Hello World!”, “Text64”, 0, -90, Color(255,0,0,255), TEXT_ALIGN_CENTER, 1)
cam.End3D2D()
end
end
[/lua]

i got that from here http://forum.facepunch.com/showthread.php?t=1061784 i put it in my cl_init dosnt seem to work. no errors.
YES I HAVE MODIFIED the code

[editline]28th September 2014[/editline]

Bump.

If you are using Garry’s Mod 13, the GM12 version of surface.CreateFont()



surface.CreateFont( "coolvetica", 64, 500, true, false, "Text64" ) 


Will throw an error.

To fix that, you’re gonna need to use the new method:



surface.CreateFont( "TheDefaultSettings", {
	font = "Arial",
	size = 200,
	weight = 5000,
	blursize = 0,
	scanlines = 0,
	antialias = true,
	underline = false,
	italic = false,
	strikeout = false,
	symbol = false,
	rotary = false,
	shadow = false,
	additive = false,
	outline = false,
} )


You could just use ENT:Draw

Nah its all good i ended up figuring out everything by my self witch is why im happy :slight_smile: