Welcome Message Animation

There was a job on Coderhire for someone to make them an animated welcome message appear on the screen when a player logs in. Not something that really needs paying for so I gave them this and thought I’d put it here as well in-case anyone else wants it.

I’m still new to Lua, so feel free to complain about my coding and hopefully I’ll learn from my mistakes :wink:

Please ignore the talking, I was watching Talking Bad :wink:

You could try and do it when the player first moves?

I did consider that. Either first move, or look for movements? But would that not require a check every few seconds to see if the player has moved and if they have check if the message has already been displayed?

Looks great. Thanks for this. Also, what Ejbaker said.

hook.Add it in initial spawn, hook.Remove it when it happens.

if SERVER then
util.AddNetworkString( “welcomemessage” )
hook.Add( “PlayerInitialSpawn”, “WelcomeMessage”, function( ply )
net.Start( “welcomemessage” )
net.Send( ply )
end )
net.Receive( “welcomemessage”, function()
hook.Add( “PlayerBindPress”, “WelcomeMessageCLIENT”, function()
// display welcome message
hook.Remove( “PlayerBindPress”, “WelcomeMessageCLIENT” )
end )
end )

Thanks Humble, but I went with another option instead :slight_smile:

To anyone interested, this, as far as I know, is now a fully working script. I’ve just added better checking for when the player is in, so it now will happen 5 seconds after the players entity has been created, instead of just when they have connected.

Also added removing the VGUI elements which I forgot, so they were always there but just invisible. That’s been fixed.


That really can add some style to a server

Thanks for sharing!

Thanks, I’m gunna make up some more quick ones for things like admin announcements, and also add a similar message that will appear on the side of peoples screens to show players when they log in.

Aw, that’s pretty neat! It’s always nice to see small additions being released here.

I love small, simplistic scripts. Just small things that add to the server.