Forum

> > CS2D > Scripts > Play sound when the player join the server
Forums overviewCS2D overview Scripts overviewLog in to reply

English Play sound when the player join the server

7 replies
To the start Previous 1 Next To the start

old Re: Play sound when the player join the server

GeoB99
Moderator Off Offline

Quote
1
2
3
4
5
function SoundOnJoin(id)
  parse('sv_sound2 ' .. id .. ' pathsoundhere')
end

addhook('join', 'SoundOnJoin')

pathsoundhere
inside the string quotes must be replaced with the path location of your specific sound.

old Re: Play sound when the player join the server

kerker
User Off Offline

Quote
@user GeoB99: e.g
1
2
3
4
function SoundOnJoin(id)
  parse('sv_sound2 ' .. id .. ' C:\Users\PC\Documents\CS2D\sfx\music.ogg')
end
addhook('join', 'SoundOnJoin')
or
1
2
3
4
5
function SoundOnJoin(id)
  parse('sv_sound2 ' .. id .. ' \sfx\music.ogg')
end

addhook('join', 'SoundOnJoin')
?
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview