Forum
CS2D Scripts Play sound when the player join the serverPlay sound when the player join the server
7 replies 1
1
2
3
4
5
2
3
4
5
function SoundOnJoin(id) parse('sv_sound2 ' .. id .. ' pathsoundhere') end addhook('join', 'SoundOnJoin')
pathsoundhereinside the string quotes must be replaced with the path location of your specific sound.
1
2
3
4
2
3
4
function SoundOnJoin(id) parse('sv_sound2 ' .. id .. ' C:\Users\PC\Documents\CS2D\sfx\music.ogg') end addhook('join', 'SoundOnJoin')
1
2
3
4
5
2
3
4
5
function SoundOnJoin(id) parse('sv_sound2 ' .. id .. ' \sfx\music.ogg') end addhook('join', 'SoundOnJoin')
1
sfx/music.ogg
music.ogg
Avo has written
And that's a thing too Use team hook instead. I believe that player won't hear a sound started during a join-hook function.
1