Playing sound files when a player joins

How do I do that? I tried checking multiple lua files but couldn’t find it. So when a player joins the server i want them to hear a sound/music file. Please help me!

http://gmodwiki.com/wiki.garrysmod.com/index69db.html?title=Surface.PlaySound

Something like this may help (this is a shared file loaded on both the client and the server)

[lua]if (SERVER) then
hook.Add(“PlayerInitialSpawn”, function(ply)
umsg.Start(“StartSound”, ply)
umsg.Bool(true)
umsg.End()
end)
else
usermessage.Hook(“StartSound”, function(um)
surface.PlaySound(“PATH_TO_SOUND_FILE”)
end)
end

[/lua]