Displaying a .vtf

Can anyone make me a script that displays a .vtf(A logo) in the middle of the screen on client connect then fades out? I can’t quite figure this one out.

Use surface.DrawTexturedRect on a HUDPaint hook where the alpha drops gradually.

As for initial spawn, have the server send them a usemessage on PlayerInitialSpawn.

client-side psudocode. I’m not sure if playerinitialspawn works clientside but if it does, it might be better than initialize which is what my code currently uses.
This fades whatever you draw from 255 to 0 in approx 12.5 seconds. If you increase the fade-rate (20 currently), make sure you change 12.5 in order to stop painting before it reaches 0.

And this would go in lua/autorun
[lua]
if SERVER then AddCSLuaFile(“filename.lua”) end
else
hook.Add(“Initialize”,“MakeLogoHook”,function()
local started = CurTime()
hook.Add(“HUDPaint”,“PaintLogoHook”,function()
surface.SetColor(255,255,255,255-(CurTime()+started)*20)
–Draw logo
if CurTime()-started>12.5 then hook.Remove(“HUDPaint”,“PaintLogoHook”) end
end)
end)
end
[/lua]