Raised This Month: $51 Target: $400
 12% 

EmitSoundAny


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iGANGNAM
AlliedModders Donor
Join Date: Sep 2012
Location: Lithuania
Old 03-12-2015 , 09:17   EmitSoundAny
Reply With Quote #1

Hello, i'm using this stock from somewhere (I found on this forum, because CS:GO sounds weren't working for me properly):

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)
{
    new 
clients[MaxClients];
    new 
total 0;
    
    for (new 
i=1i<=MaxClientsi++)
    {
        if (
IsClientInGame(i))
        {
            
clients[total++] = i;
        }
    }
    
    if (!
total)
    {
        return;
    }
    
    
EmitSoundAny(clientstotalsampleentitychannel
    
levelflagsvolumepitchspeakerentity,
    
origindirupdatePossoundtime);

it works for me (because I had problems with cs:go before) but sound isn't so good I mean it's too too quiet

EmitSoundToAllAny( "music/l4d/kaboom.mp3", iEnt);

Last edited by iGANGNAM; 03-12-2015 at 09:18.
iGANGNAM is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 03-12-2015 , 09:37   Re: EmitSoundAny
Reply With Quote #2

you mean this? https://forums.alliedmods.net/showthread.php?t=237045
Have you tried changing the volume argument.
Mitchell is offline
iGANGNAM
AlliedModders Donor
Join Date: Sep 2012
Location: Lithuania
Old 03-12-2015 , 10:02   Re: EmitSoundAny
Reply With Quote #3

Quote:
Originally Posted by Mitchell View Post
you mean this? https://forums.alliedmods.net/showthread.php?t=237045
Have you tried changing the volume argument.
yes, this one, what limit does it has? I mean range like 1.0-20.0
iGANGNAM is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 03-12-2015 , 11:16   Re: EmitSoundAny
Reply With Quote #4

Quote:
Originally Posted by iGANGNAM View Post
yes, this one, what limit does it has? I mean range like 1.0-20.0
SOmething you'll have to play around with, I'm not entirely confident it would make it too loud.
Mitchell is offline
cam0
Senior Member
Join Date: Feb 2015
Old 05-23-2015 , 19:13   Re: EmitSoundAny
Reply With Quote #5

Code:
// make clients download it Format(sPSound, sizeof(sPSound), "sound/btimes/%s", sSound); AddFileToDownloadsTable(sPSound); // precache the sound Format(sPSound, sizeof(sPSound), "btimes/%s", sSound); PrecacheSoundAny(sPSound); // Later in file new numClients, clients[MaxClients + 1]; for(new target = 1; target <= MaxClients; target++) {      if(IsClientInGame(target))       clients[numClients++] = target; } EmitSoundAny(clients, numClients, sSound);
When the sound is attempted to play, I get this error in client console:
Code:
[Sound] S_StartSound(): Failed to load sound '*btimes\fancy.wav'. File is missing from disk/repository.
cam0 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:38.


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