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

CS:GO behaves weird with EmitSoundToAll


Post New Thread Reply   
 
Thread Tools Display Modes
Mitchell
~lick~
Join Date: Mar 2010
Old 02-17-2017 , 23:20   Re: CS:GO behaves weird with EmitSoundToAll
Reply With Quote #11

Quote:
Originally Posted by BoosterGold View Post
If that's true, why does it work perfectly fine with exactly one player on a team, but fail to work when another player joins?
Yeah, you got me there, that's pretty strange.
Mitchell is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-18-2017 , 01:11   Re: CS:GO behaves weird with EmitSoundToAll
Reply With Quote #12

Quote:
Originally Posted by psychonic View Post
You should not need to use any tricks with the asterisk with built-in sounds as they should already be in the client's on-disk sound cache. (The * bypasses that and streams the file directly).

You should be able to precache and play like sounds in any other game, custom or built-in.
People have reported before that only MP3 files work using the * method. Why that is, I have no idea.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
ambn
Veteran Member
Join Date: Feb 2015
Location: Fun servers
Old 02-18-2017 , 12:39   Re: CS:GO behaves weird with EmitSoundToAll
Reply With Quote #13

maybe try this?
that's what works for me .
PHP Code:
for(int player 1player <= MaxClientsplayer++)
{
    
ClientCommand(player"play */misc/all/vip/vip1.mp3");

__________________

Last edited by ambn; 02-18-2017 at 12:39.
ambn is offline
OSWO
Senior Member
Join Date: Jul 2015
Location: United Kingdom, London
Old 02-18-2017 , 16:41   Re: CS:GO behaves weird with EmitSoundToAll
Reply With Quote #14

Quote:
Originally Posted by ambn View Post
maybe try this?
that's what works for me .
PHP Code:
for(int player 1player <= MaxClientsplayer++)
{
    
ClientCommand(player"play */misc/all/vip/vip1.mp3");

The problem I've found doing it this way is that multiple "sound streams" cannot be played at once.
__________________
SourceTimer | WeaponSkins++ | BasePlugins++ https://github.com/OSCAR-WOS
OSWO is offline
BoosterGold
Member
Join Date: Nov 2016
Old 02-18-2017 , 17:53   Re: CS:GO behaves weird with EmitSoundToAll
Reply With Quote #15

Quote:
Originally Posted by ambn View Post
maybe try this?
that's what works for me .
PHP Code:
for(int player 1player <= MaxClientsplayer++)
{
    
ClientCommand(player"play */misc/all/vip/vip1.mp3");

My understanding was that the play command is protected and the server can't force clients to do it if they have cl_restrict_server_commands set to 1 (the default value). I'll try it anyway when I can get back to my PC.

EDIT: Haha, nevermind, cl_restrict_server_commands was removed in like 2007.

Last edited by BoosterGold; 02-19-2017 at 18:45. Reason: im dumb
BoosterGold is offline
BoosterGold
Member
Join Date: Nov 2016
Old 02-19-2017 , 18:42   Re: CS:GO behaves weird with EmitSoundToAll
Reply With Quote #16

Quote:
Originally Posted by ambn View Post
maybe try this?
that's what works for me .
PHP Code:
for(int player 1player <= MaxClientsplayer++)
{
    
ClientCommand(player"play */misc/all/vip/vip1.mp3");

I implemented this exactly as you have it and it works exactly like I want it to. Just for testing's sake, I also tried this:

PHP Code:
for(int player 1player <= MaxClientsplayer++)
{
    
EmitSoundToClient(player"player/vo/phoenix/goingtoplantbomba02.wav");

This went back to the weird behavior I described in the OP. So I think EmitSoundTo<x> is just buggy in CS:GO.
BoosterGold 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 00:11.


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