How to get intro music for dedicated servers

hey there lads my mates got a server for trouble in tettorist town and he needs to know how to add intro music for when people join the server… Ive seen tons of people doing it for theire servers and i seriously have no idea :smiley: so help and infomation/links and all that shit will be much appretiated


(User was banned for this post ("Wrong section" - mahalis))

Simply hook onto **[Gamemode.PlayerInitialSpawn

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Gamemode.PlayerInitialSpawn)**
and do
[lua]
WHATEVERYOUCALLEDTHEPlAYERARGUMENT:ConCommand( “play THESOUND” )
[/lua]

or you can do

[lua]
WHATEVERYOUCALLEDTHEPlAYERARGUMENT:SendLua( [[surface.PlaySound( “SOUND” ) ]] )
[/lua]

:byodood:

Dear christ. Have you even heard of usermessages and clientside code?

Or you could open a url on the player to a youtube video or something.
/spitballing

I just prefer using serverside code.

[editline]09:16PM[/editline]

It’s a habit I got into when I was trying to minimize downloads.

[editline]09:17PM[/editline]

Also, SendLua is a usermessage. :v:

hook.Add(“InitPostEntity” , “Wat” , function() surface.PlaySound(“fap.mp3”) end )

No serverside code, no networking.