PDA

View Full Version : .wav don't play :(


reinert
01-05-2011, 15:28
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:

if ( file_exists( "sound/confirmed0.wav" ) )
precache_sound( "confirmed0.wav" );It works, I've downloaded it...


and then: client_cmd(id, "spk confirmed0" );Nothing happens...

Download .wav file (http://www.upload.ee/files/1031559/confirmed0.wav.html)

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
try emit_sound() (http://www.amxmodx.org/funcwiki.php?go=func&id=282)

fezh
01-05-2011, 16:05
Have you tried with client_cmd(id, "spk confirmed0.wav" ) ?

reinert
01-05-2011, 16:10
try emit_sound() (http://www.amxmodx.org/funcwiki.php?go=func&id=282)

How to use it correctly ? an example please ?

Have you tried with client_cmd(id, "spk confirmed0.wav" ) ?

Now I did, nothing :(

wrecked_
01-05-2011, 16:24
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
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
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 :(


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
@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
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
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

reinert
01-05-2011, 16:41
By the way, when the cs downloads something from server, when I reconnect it downloads same files again... I've checked that when files are downloaded from .wav they become .wav.old (wtf?)

MyDooMJr
01-05-2011, 16:42
That isn't with me :)

Remove the IF thing.

reinert
01-05-2011, 16:43
Can't be, file_exists check the file on server, not on client

MyDooMJr
01-05-2011, 16:44
just download an plugin which precaches sounds or models and u will know by reviewing the code :)

Regards

GXLZPGX
01-05-2011, 16:51
MyDoom, you obviously don't know whats wrong. CS:S (as far as I know) players wav files in different formats, and higher quality thats for sure. Get a wav file converter, or an mp3 converter, and change the settings of the .wav to mono stereo and I believe.. 22050 Hz
Otherwise, it won't play in CS1.6

MyDooMJr
01-05-2011, 16:53
Hhaha, so how do you explain i type speak sound/confirmed0 and i hear the song ?

Regards.

reinert
01-05-2011, 16:56
MyDoom, you obviously don't know whats wrong. CS:S (as far as I know) players wav files in different formats, and higher quality thats for sure. Get a wav file converter, or an mp3 converter, and change the settings of the .wav to mono stereo and I believe.. 22050 Hz
Otherwise, it won't play in CS1.6

Already found problem, the problem is in my cs... and already fixed it ;D

LOCK!

MyDooMJr
01-05-2011, 17:15
reinert also read a pm i sent to you :)

Regards

SpeeDeeR
01-05-2011, 18:03
Already found problem, the problem is in my cs... and already fixed it ;D

LOCK!
Well this sure is a fail