Raised This Month: $7 Target: $400
 1% 

EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-19)


Post New Thread Reply   
 
Thread Tools Display Modes
rodpod
SourceMod Donor
Join Date: Jan 2005
Old 12-28-2014 , 14:02   Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
Reply With Quote #21

do I still need to force clients to download custom content from server? i.e. from folder sound/music/MYOWNFOLDER/*.* using separate plugin?
rodpod is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-29-2014 , 10:30   Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
Reply With Quote #22

Quote:
Originally Posted by rodpod View Post
do I still need to force clients to download custom content from server? i.e. from folder sound/music/MYOWNFOLDER/*.* using separate plugin?
Yes, something needs to make the user download the files.

Having said that, this is only a plugin fragment intended to be included in other plugins that need to be able to play sounds on both CS:GO and older games (like CS:S).
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
apocalyptic
Senior Member
Join Date: Feb 2013
Location: China
Old 02-21-2015 , 23:32   Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
Reply With Quote #23

Quote:
Originally Posted by Pohearts View Post
Somehow the compiler crashed when i compile it :/
possibly i'm using SM 1.7..
i will have to go for traditional way to EmitSound for csgo then ..
yes, i got the same problem here. sourcemod 5155 cannot fix it.
apocalyptic is offline
vanbka9
New Member
Join Date: Feb 2015
Old 02-22-2015 , 11:05   Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
Reply With Quote #24

PHP Code:
stock EmitAmbientSoundAny(const String:name[], // switch to "sample" 
                        
const Float:pos[3],
                        
entity SOUND_FROM_WORLD,
                        
level SNDLEVEL_NORMAL,
                        
flags SND_NOFLAGS,
                        
Float:vol SNDVOL_NORMAL,
                        
pitch SNDPITCH_NORMAL,
                        
Float:delay 0.0)
{
    
decl String:szSound[PLATFORM_MAX_PATH];
    
    if (
g_bNeedsFakePrecache)
    {
        
Format(szSoundsizeof(szSound), "*%s"sample); // cuz here "sample"
    
}
    else
    {
        
strcopy(szSoundsizeof(szSound), sample);
    }
    
    
EmitAmbientSound(szSoundposentitylevelflagsvolpitchdelay);

vanbka9 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-22-2015 , 14:56   Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
Reply With Quote #25

Quote:
Originally Posted by apocalyptic View Post
yes, i got the same problem here. sourcemod 5155 cannot fix it.
I'm not sure what to tell you. I can even compile a new-style test plugin and it doesn't crash.

Having said that, I've noticed I can't compiler the EmitSoundAny version of MapChooser Extended Sounds under 1.7. The errors it spits don't seem to make sense either.

I'll have to look into that.

Quote:
Originally Posted by vanbka9 View Post
PHP Code:
stock EmitAmbientSoundAny(const String:name[], // switch to "sample" 
                        
const Float:pos[3],
                        
entity SOUND_FROM_WORLD,
                        
level SNDLEVEL_NORMAL,
                        
flags SND_NOFLAGS,
                        
Float:vol SNDVOL_NORMAL,
                        
pitch SNDPITCH_NORMAL,
                        
Float:delay 0.0)
{
    
decl String:szSound[PLATFORM_MAX_PATH];
    
    if (
g_bNeedsFakePrecache)
    {
        
Format(szSoundsizeof(szSound), "*%s"sample); // cuz here "sample"
    
}
    else
    {
        
strcopy(szSoundsizeof(szSound), sample);
    }
    
    
EmitAmbientSound(szSoundposentitylevelflagsvolpitchdelay);

Yes, this is definitely a bug.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
apocalyptic
Senior Member
Join Date: Feb 2013
Location: China
Old 02-25-2015 , 02:04   Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
Reply With Quote #26

Quote:
Originally Posted by vanbka9 View Post
PHP Code:
stock EmitAmbientSoundAny(const String:name[], // switch to "sample" 
modify emitsoundany.inc, replace name with sample, then everything will be good.
remember: source engine may not support wav sounds, you can use mp3 sounds.

Last edited by apocalyptic; 02-25-2015 at 02:33.
apocalyptic is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-26-2015 , 14:07   Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
Reply With Quote #27

Quote:
Originally Posted by apocalyptic View Post
modify emitsoundany.inc, replace name with sample, then everything will be good.
remember: source engine may not support wav sounds, you can use mp3 sounds.
I've already modified it, I just wanted to wait to get any other bugs out of the way before replacing the version in the first post with it... but as I said, I can (and have) compiled plugins using SM 1.7 with it and haven't run into a problem with PrecacheSoundAny. EmitSoundAnyToClient, EmitSoundAnyToAll, and EmitSoundAny.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
DabuDos
Junior Member
Join Date: Feb 2015
Location: Germany
Old 03-03-2015 , 04:44   Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
Reply With Quote #28

Quote:
Originally Posted by Powerlord View Post
I've already modified it, I just wanted to wait to get any other bugs out of the way before replacing the version in the first post with it... but as I said, I can (and have) compiled plugins using SM 1.7 with it and haven't run into a problem with PrecacheSoundAny. EmitSoundAnyToClient, EmitSoundAnyToAll, and EmitSoundAny.
They are working, yes. But I allways have to change the map one time before it works. Otherwise "Sound is not Precached".
DabuDos is offline
Totenfluch
AlliedModders Donor
Join Date: Jan 2012
Location: Germany
Old 03-07-2015 , 15:37   Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
Reply With Quote #29

Hey, I tried using your .include with my Sound plugin but the Sound didn't play and I also didn't get any Error either the Client console and Server console.

My Code looks like the following:

Code:
public OnMapStart()
{
    AddFileToDownloadsTable(..);
    PrecacheSoundAny(..);
}
public EventRoundEnd(...) {
     for( new client = 1; client < MAXPLAYERS-2; client++){
			if(IsValidClient(client)){
                        EmitSoundToClientAny(client, "music/TPlayer/xlol.mp3", _, _, _, _, 1.0);
                        }
      }
}
Any clues what I may have done wrong?

Last edited by Totenfluch; 03-07-2015 at 15:37.
Totenfluch is offline
iGANGNAM
AlliedModders Donor
Join Date: Sep 2012
Location: Lithuania
Old 03-12-2015 , 14:06   Re: EmitSoundAny - Cross-game sound emitting (aka CS:GO compatible) (1.0.2, 2014-03-1
Reply With Quote #30

Can you give me example of StopSoundAny?
iGANGNAM is offline
Reply


Thread Tools
Display Modes

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 02:51.


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