AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   emit_sound (https://forums.alliedmods.net/showthread.php?t=164471)

Sniffi 08-12-2011 03:54

emit_sound
 
Hi, i have a problem that emit_sound don`t play sound.
Help me , please.
Here is a part of code:

Code:

new const sounds[] = "sound/mysound.wav"

public plugin_init() {
    //...   
//only for test   
register_clcmd("say /test","music")

public music(id) {         

emit_sound(id,CHAN_STREAM,sounds,VOL_NORM,ATTN_NORM,0,PITCH_NORM)
}


bibu 08-12-2011 05:38

Re: emit_sound
 
1) Is your sound precached?
2) Try to use another channel. (CHAN_AUTO for ex.)

Sniffi 08-12-2011 07:19

Re: emit_sound
 
1. Yes , its precached
2.I try everything, I use all channels , attns ... , and when i play it with client_cmd(id,"speak %s",sounds) it`s good and when I use emit_sound it doesn`t work.
I try use another song and still nothing.
(song parameters : mono , 16 bit , wav)

Doc-Holiday 08-12-2011 08:27

Re: emit_sound
 
forprecache sound you dont need sound/ for the path... that means its in sound/sound/file.wav

also for future you should use

[php][/php] tags.

Sniffi 08-12-2011 13:09

Re: emit_sound
 
Thank you , I forgot on it :)


All times are GMT -4. The time now is 03:29.

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