AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   .wav don't play :( (https://forums.alliedmods.net/showthread.php?t=147122)

reinert 01-05-2011 15:28

.wav don't play :(
 
Hey, I've made that player should hear one .wav sound, its very short just a beep, but it doesn't player in CS, however it doesn't start playing manually when I type spk other0.wav into my console :(

What is the possible solutions ?

Made people download wav file:

PHP Code:

if ( file_exists"sound/confirmed0.wav" ) )
        
precache_sound"confirmed0.wav" ); 

It works, I've downloaded it...


and then:
PHP Code:

client_cmd(id"spk confirmed0" ); 

Nothing happens...

Download .wav file

Also I can't hear it with my winamp player, I think it's too short to be played, but my windows media player plays it :))

SpeeDeeR 01-05-2011 16:04

Re: .wav don't play :(
 
try emit_sound()

fezh 01-05-2011 16:05

Re: .wav don't play :(
 
Have you tried with client_cmd(id, "spk confirmed0.wav" ) ?

reinert 01-05-2011 16:10

Re: .wav don't play :(
 
Quote:

Originally Posted by SpeeDeeR (Post 1386861)

How to use it correctly ? an example please ?

Quote:

Originally Posted by fezh (Post 1386862)
Have you tried with client_cmd(id, "spk confirmed0.wav" ) ?

Now I did, nothing :(

wrecked_ 01-05-2011 16:24

Re: .wav don't play :(
 
If Winamp, a media player, doesn't play your media, what makes you think Counter-Strike will be able to?

MyDooMJr 01-05-2011 16:26

Re: .wav don't play :(
 
speak or spk are the same,

if file is .wav == You should follow these 2 lines.
if song is in a folder = client_cmd(id,"speak sound/folder/song.wav")
if song is in sound folder = client_cmd(id,"speak sound/song.wav")

if file is .mp3 == You should follow these 2 lines.
if song is in a folder = client_cmd(id,"mp3 play sound/folder/song.mp3")
if song is in sound folder = client_cmd(id,"mp3 play sound/song.mp3")

Regards :)

Also i can hear the song, is when an player connect to server, or the KZ Thing right ?

reinert 01-05-2011 16:29

Re: .wav don't play :(
 
Quote:

Originally Posted by MyDooMJr (Post 1386881)
speak or spk are the same,

if file is .wav == You should follow these 2 lines.
if song is in a folder = client_cmd(id,"speak sound/folder/song.wav")
if song is in sound folder = client_cmd(id,"speak sound/song.wav")

if file is .mp3 == You should follow these 2 lines.
if song is in a folder = client_cmd(id,"mp3 play sound/folder/song.mp3")
if song is in sound folder = client_cmd(id,"mp3 play sound/song.mp3")

Regards :)

Didn't helped :(


Quote:

Originally Posted by wrecked_ (Post 1386880)
If Winamp, a media player, doesn't play your media, what makes you think Counter-Strike will be able to?

Dude, the windows 7 media player plays it... Also I took these .wav files from CS:S ;]

MyDooMJr 01-05-2011 16:32

Re: .wav don't play :(
 
@reinert it have to work !! try on console speak that thing and u will see..
some trouble on ur code .

reinert 01-05-2011 16:34

Re: .wav don't play :(
 
I know it has to, have you tried yourself with that confirmed0.wav file ?

I need emit_sound example, then I can try with it too ;S

EDIT: I've downloaded non-steam counter-strike to test it, it works with it... but what can be the problem with my steamed cs (I've volume higher than when I'm playing, the problem is not here)

MyDooMJr 01-05-2011 16:37

Re: .wav don't play :(
 
speak sound/confirmed0

Works on me :)

But why emit_sound ?

If player downloaded the song why are u going to emit sound ?? i didn't understand... if u can simple write speak sound/confirmed0.

NOTE : My steam is in my country language, so my cs has 2 folders, cstrike and cstrike_country, i put the song on cstrike_country/Sound.

regards


All times are GMT -4. The time now is 02:07.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.