Forum

> > CS2D > Scripts > Play sound when the player join the server
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Play sound when the player join the server

7 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Re: Play sound when the player join the server

GeoB99
Moderator Off Offline

Zitieren
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.

alt Re: Play sound when the player join the server

kerker
User Off Offline

Zitieren
@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')
?
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht