Floating text in gm_flatgrass

Hello.

I am a complete noob with lua, i don’t know one word of it.
I found this on Overvs blog : http://i26.tinypic.com/mcwua0.jpg
I was wondering if anyone could help me create something like this, or even, point me in the right direction. If you could, i would really appreciate it as i have been looking for something similar to use on my server for some time now.

Thanks.

You just need to create an entity that draws some nicey text with some 3d2d magic, i could provde some example code if you want…

Yes please, I would like something like this as well.

Aualin, please do. Thanks.

You could search the forums… It’s only down a few threads.

http://www.facepunch.com/showthread.php?t=850789

Example code is there to.

I was just in there, not really helpful, i don’t know what code to put in what files :C Thanks anyway.

Sigh.

[lua]
function ENT:DrawTranslucent()

// Aim the screen forward
local ang = self.Entity:GetAngles()
local pos = self.Entity:GetPos() + ang:Up()

ang:RotateAroundAxis( ang:Forward(), 90 )
ang:RotateAroundAxis( ang:Right(), 90 )

if (LocalPlayer():EyePos() - pos ):DotProduct( ang:Up() ) < 0 then
	ang:RotateAroundAxis( ang:Right(), 180 )
end

// Start the fun
cam.Start3D2D( pos, ang, 0.5 )
	
	surface.SetFont( "UIBold" )
	surface.SetTextColor( 255, 255, 255, 255 )
	surface.SetTextPos( 0, 0 )
	surface.DrawText( "urmom" )
	
	
cam.End3D2D()

end
[/lua]

Thanks a ton.

[editline]05:09PM[/editline]

Hmph, i created a folder, put an info.txt in there, added a lua folder, added an autorun folder inside that and inside the autorun folder i put scoreboard.lua and inserted the text you gave me, It doesn’t seem to work.

Pretty sure u need to spawn it to?

You need to put that in an entity, you can’t just place it in autorun and expect it to work…

Ugh, what? As i said before, I’m a complete retard in lua.

Look at this or this.

And i put the code in where…?

Oh jesus christ.

Doesn’t really help. It’s not as if Im going to learn lua in an hour

[editline]06:10PM[/editline]

Also, iRzilla, where does the script create the text?

this should be in the request section

Probably

[editline]07:01PM[/editline]

Still doesn’t work…

I have officially resorted to paying someone to do it for me.

But iRzilla gave you the raw code above…

You payed someone to copy and paste the code from this thread to a entity? Gg.