View Single Post
Papero
Veteran Member
Join Date: Aug 2016
Location: Italy
Old 06-17-2018 , 14:55   Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
Reply With Quote #78

Quote:
Originally Posted by Powerlord View Post
To be fair, I'm not even sure if this include is necessary any more. I've heard a recent CS:GO update made it unnecessary.
I've just ran some test and the results were that the sound got played even tough I haven't used emitsoundany but the "default" emitsound so I can confirm you tought

My test case:
PHP Code:
#define SOUND "sound/hexah/mafix.wav"
#define PLAY "hexah/mafix.wav"

public void OnPluginStart()
{
    
RegConsoleCmd("sm_playsound"Cmd_Play);
}

public 
void OnMapStart()
{
    
AddFileToDownloadsTable(SOUND);
    
PrecacheSound(PLAY);
}

public 
Action Cmd_Play(int clientint args)
{
    
float vPos[3];
    
GetClientAbsOrigin(clientvPos);
    
EmitAmbientSound(PLAYvPos);

I've tried both .mp3 & .wav

Quote:
Originally Posted by Bacardi View Post
@fragnichtnach, ...what I remember, there is differences with *.wav and *.mp3 files. *.wav files work immediatelly if I don't remember wrong.
Here works fine with both
__________________
My Plugins
SPCode


Steam: hexer504
Telegram: Hexah
Discord: Hexah#6903

If you like my work you can donate here!
Papero is offline