Put an Overlay on Screen

For my afk system I would like to make a slightly see through overlay that covers the players whole screen with big red text in the middle but I am not sure if I would use derma or another way, it can’t have focus because there are many hooks that will need to hide it such as keyreleased.

Sounds pretty simple to make. What does the text have to say? It could just be an image.

Just wanted giant afk text in red.

hook.Add("HUDPaint", "AFKPAINT", function()
surface.CreateFont( "Arial", 21, 500, true, false, "MYFONT" )
surface.SetFont( "MYFONT" )
draw.SimpleText("AFK", "MYFONT", ScrW() / 2 - 100, ScrH() - 70, Color(255,0,0,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER)

This could work, I haven’t tested it yet.

Bad bad bad. Never create a font ever frame >_<


hook.Add(“HUDPaint”, “AFKPAINT”, function()
surface.SetFont( “HUDNumber5” )
local w,h = surface.GetTextSize(“You are currently AFK”)
surface.DrawText(“You are currently AFK”)
surface.SetTextColor( 200, 200, 200, 255 )
Just for you

Ooops, I didn’t realise I did that, haha, but you do need to create a font, because of:

So you can scale the text size bigger.

Hey nice key


/inside joke