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

[CS:GO] Can't download sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Krushy
Member
Join Date: Jul 2014
Old 08-02-2014 , 10:12   [CS:GO] Can't download sound
Reply With Quote #1

Hi all !

I added sound on my cs:go server, but neither sound downloaded...
Someone have idea?

Krushy
Krushy is offline
SadScrub
Member
Join Date: May 2014
Old 08-02-2014 , 11:01   Re: [CS:GO] Can't download sound
Reply With Quote #2

Did you add those sounds to the download table using AddFileToDownloadsTable() ?
__________________
SadScrub is offline
Krushy
Member
Join Date: Jul 2014
Old 08-02-2014 , 11:30   Re: [CS:GO] Can't download sound
Reply With Quote #3

Of Course ^^
Krushy is offline
Krushy
Member
Join Date: Jul 2014
Old 08-02-2014 , 11:42   Re: [CS:GO] Can't download sound
Reply With Quote #4

This is doesn't work.

PHP Code:
#include <sourcemod>
#include <emitsoundany>

public OnPluginStart()
{
    
HookEvent("round_end"OnRoundEnd);
}
    
public 
OnMapStart()
{
    
PrecacheSoundAny("sound/test/test01.mp3"true);
    
AddFileToDownloadsTable("sound/test/test01.mp3");
}

public 
Action:OnRoundEnd(Handle:eventString:name[], bool:DontBroadCast)
{
    
EmitSoundToAllAny("test/test01.mp3");

Krushy is offline
SadScrub
Member
Join Date: May 2014
Old 08-02-2014 , 11:49   Re: [CS:GO] Can't download sound
Reply With Quote #5

Try removing the "sound/" part of your PrecacheSoundAny call. That's pretty much the only thing I can think of, sadly.
__________________
SadScrub is offline
Krushy
Member
Join Date: Jul 2014
Old 08-02-2014 , 12:04   Re: [CS:GO] Can't download sound
Reply With Quote #6

ok, but it does not want to download sound :/

And i have this error :

[Sound] S_StartSound(): Failed to load sound '*bsmusicsbox\bsmusic15.mp3'. Can't create mixer.

This is a stupid mistake that I cannot solve !!! x)
Krushy is offline
mukunda
Member
Join Date: Sep 2012
Old 08-03-2014 , 16:35   Re: [CS:GO] Can't download sound
Reply With Quote #7

For CS:GO you need to prefix your sound path with a *, i.e. "*test/test01.mp3". The * is the streaming flag, and for some reason CS:GO requires it for custom sounds.

AddFileToDownloadsTable( "sound/test/test.mp3" );
...
PrecacheSound( "*test/test.mp3" );
...
EmitSoundToAll( "*test/test.mp3" );

Sound in the sound/music folder does not need the asterisk trick, and is scaled by the user's music volume setting.
__________________

Last edited by mukunda; 08-03-2014 at 16:37.
mukunda is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-03-2014 , 16:47   Re: [CS:GO] Can't download sound
Reply With Quote #8

Quote:
Originally Posted by mukunda View Post
For CS:GO you need to prefix your sound path with a *, i.e. "*test/test01.mp3". The * is the streaming flag, and for some reason CS:GO requires it for custom sounds.

AddFileToDownloadsTable( "sound/test/test.mp3" );
...
PrecacheSound( "*test/test.mp3" );
...
EmitSoundToAll( "*test/test.mp3" );

Sound in the sound/music folder does not need the asterisk trick, and is scaled by the user's music volume setting.
The whole point of PrecacheSoundAny / EmitSoundAny are that they handle the differences between the various games precaching and emitting rules.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 08-03-2014 at 16:47.
Powerlord is offline
Krushy
Member
Join Date: Jul 2014
Old 08-04-2014 , 05:00   Re: [CS:GO] Can't download sound
Reply With Quote #9

good morning !

i tried this :

PHP Code:
#include <sourcemod>
#include <emitsoundany>

public OnPluginStart()
{
    
HookEvent("round_end"OnRoundEnd);
}
    
public 
OnMapStart()
{
    
PrecacheSoundAny("*test/test01.mp3"true);
    
AddFileToDownloadsTable("sound/test/test01.mp3");
}

public 
Action:OnRoundEnd(Handle:eventString:name[], bool:DontBroadCast)
{
    
EmitSoundToAllAny("*test/test01.mp3");

But, its still not working, i have this error :

[Sound] S_StartSound(): Failed to load sound '**test/test01.mp3'. Can't create mixer.

Last edited by Krushy; 08-04-2014 at 13:12.
Krushy is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-04-2014 , 09:03   Re: [CS:GO] Can't download sound
Reply With Quote #10

Try this:

PHP Code:
#include <sourcemod>
#include <emitsoundany>

public OnPluginStart()
{
    
HookEvent("round_end"OnRoundEnd);
}
    
public 
OnMapStart()
{
    
PrecacheSoundAny("test/test01.mp3"true);
    
AddFileToDownloadsTable("sound/test/test01.mp3");
}

public 
Action:OnRoundEnd(Handle:eventString:name[], bool:DontBroadCast)
{
    
EmitSoundToAllAny("test/test01.mp3");

__________________
Not currently working on SourceMod plugin development.
Powerlord 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 02:46.


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