Bypasses DSP and affected by the user's music volume setting.
client setting
Code:
"snd_musicvolume" = "1.0" min. 0.000000 max. 1.000000
archive
- Music volume
video
Playing sound or music, you can make it more client friendly,
add this char # front of sound path.
ClientCommand
PHP Code:
// Whole file path to sound file
new String:sound[PLATFORM_MAX_PATH];
Format(sound, sizeof(sound), "sound/custom/sample.wav");
// Path is to sound folder and file exist, either in or outside Steam files aka VPK
if(StrContains(sound, "sound/") == 0 && FileExists(sound, true))
{
Format(sound, sizeof(sound), "#%s", sound[6]);
// Whole file path to sound file
new String:sound[PLATFORM_MAX_PATH];
Format(sound, sizeof(sound), "sound/custom/sample.wav");
// Path is to sound folder and file exist, either in or outside Steam files aka VPK
if(StrContains(sound, "sound/") == 0 && FileExists(sound, true))
{
Format(sound, sizeof(sound), "#%s", sound[6]);
// Need precache after adding sound character!
PrecacheSound(sound);
// Whole file path to sound file
new String:sound[PLATFORM_MAX_PATH];
Format(sound, sizeof(sound), "sound/custom/sample.wav");
// Path is to sound folder and file exist, either in or outside Steam files aka VPK
if(StrContains(sound, "sound/") == 0 && FileExists(sound, true))
{
Format(sound, sizeof(sound), "#%s", sound[6]);
// Need precache after adding sound character!
PrecacheSound(sound);
new Float:pos[3];
EmitAmbientSound(sound, pos, _, SNDLEVEL_NONE);
}
Note!
It's highly recommended to add sound in second folder, not place it in root ...sound/ folder.
Do it right: ...sound/myfolder/sample.wav
...not sure, maybe not work. It would be reading it normally path and gives error file missing last time I tested.
Maybe need use with another char, example: "?#folder/file.wav"