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

[CS:GO] EmitSoundToAll need help.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
k725
Junior Member
Join Date: Apr 2014
Location: Japan
Old 07-30-2014 , 07:56   [CS:GO] EmitSoundToAll need help.
Reply With Quote #1

Was able to play the sound using the EmitSoundToAll in CS:GO.
But a new problem. How do you play sound without interrupting.

sorry newbie english.
__________________
AboutMe : hoshinoa.me
k725 is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 07-30-2014 , 13:54   Re: [CS:GO] EmitSoundToAll need help.
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=244996
bl4nk is offline
k725
Junior Member
Join Date: Apr 2014
Location: Japan
Old 07-30-2014 , 18:41   Re: [CS:GO] EmitSoundToAll need help.
Reply With Quote #3

Quote:
Originally Posted by bl4nk View Post
Thanks reply.
I watched same problem thread.

// Ideal
a.mp3 play start.
b.mp3 play start.
a.mp3 playing.
b.mp3 playing.

// Actual
a.mp3 play start.
a.mp3 playing.
b.mp3 play start.
a.mp3 play stop. <- I want to play a sound at the same time. a.mp3 and b.mp3 and c..d..e..f..g..h..(a lot)
b.mp3 playing.

Q1. Can I switch the channel easily?
(I want to avoid hard-coding.)

Q2. Is this solvable?

sorry newbie english..
__________________
AboutMe : hoshinoa.me
k725 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-31-2014 , 09:49   Re: [CS:GO] EmitSoundToAll need help.
Reply With Quote #4

Specify the channel as SNDCHAN_AUTO which should use a random channel above SNDCHAN_USER_BASE.

However, be aware that you can't use StopSound if you specify a channel this way.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 07-31-2014 at 09:50.
Powerlord is offline
k725
Junior Member
Join Date: Apr 2014
Location: Japan
Old 07-31-2014 , 21:21   Re: [CS:GO] EmitSoundToAll need help.
Reply With Quote #5

Thank you reply.
I wrote the code, but it did not work well....

code::
https://gist.github.com/k725/da7e0bfb3c2542486dd8

config::
PHP Code:
"SoundFiles"
{
    
"foo"
    
{
        
"file"    "misc/test/foo.mp3"
    
}
    
"bar"
    
{
        
"file"    "misc/test/bar.mp3"
    
}

__________________
AboutMe : hoshinoa.me
k725 is offline
k725
Junior Member
Join Date: Apr 2014
Location: Japan
Old 08-05-2014 , 08:59   Re: [CS:GO] EmitSoundToAll need help.
Reply With Quote #6

Sorry. I was resolved by yourself.
__________________
AboutMe : hoshinoa.me
k725 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 08-05-2014 , 11:38   Re: [CS:GO] EmitSoundToAll need help.
Reply With Quote #7

Whoops, sorry... completely forgot about this.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 08-05-2014 , 16:43   Re: [CS:GO] EmitSoundToAll need help.
Reply With Quote #8

Quote:
Originally Posted by Powerlord View Post
Whoops, sorry... completely forgot about this.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram 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 13:24.


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