Forum
Scripts
Play sound when the player join the server
Play 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.
GeoB99: e.g 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')
kerker: 1
sfx/music.ogg
_Yank: Ok, thanks. music.ogg
Avo has writtenI believe that player won't hear a sound started during a join-hook function.
Use
team hook instead.
1

Offline