Quote:
Originally Posted by Alexunder
hi guys ,
EmitSound has problems with some sounds !!!
for example :
Code:
EmitSoundToAllAny("music/test1.mp3", SNDCHAN_AUTO, SNDLEVEL_NORMAL, SND_NOFLAGS, SNDVOL_NORMAL);
Not play , but :
Code:
ClientCommand(client, "play music/test1.mp3");
is play !!
with emitsound some sounds have problem to hear , but in "play *" all music it's play
all sounds is PrecacheSound in map start and all sounds bitrate is 128 with sample rate 44100 and stereo
|
...you skip second parameter (entity), you gave value SNDCHAN_AUTO which is 0 and played to "world" coordinate 0.0,0.0,0.0
PHP Code:
stock EmitSoundToAllAny(const String:sample[],
entity = SOUND_FROM_PLAYER,
channel = SNDCHAN_AUTO,
level = SNDLEVEL_NORMAL,
flags = SND_NOFLAGS,
Float:volume = SNDVOL_NORMAL,
pitch = SNDPITCH_NORMAL,
speakerentity = -1,
const Float:origin[3] = NULL_VECTOR,
const Float:dir[3] = NULL_VECTOR,
bool:updatePos = true,
Float:soundtime = 0.0)
Try, do this work.
Code:
EmitSoundToAllAny("music/test1.mp3");
and should it be ?
Code:
public OnMapStart()
{
AddFileToDownloadsTable("sound/music/test1.mp3");
PrecacheSoundAny("music/test1.mp3");
}
remember change level, to make sure it works.
Read
client console as well, what kind error it gives you.
__________________