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

Solved [CS:GO] How to stop round end sounds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 07-31-2017 , 00:07   [CS:GO] How to stop round end sounds
Reply With Quote #1

Code:
	...
	HookEvent("round_end", round_end);
}

public round_end(Handle:event, const String:name[], bool:silent)
{
	for( new i = 1; i < GetMaxClients(); i++ )
	{
		if (IsClientInGame(i) && !IsFakeClient(i))
		{
			ClientCommand(i, "playgamesound Music.StopAllMusic");	
		}	
	}
	...
	EmitSoun...
}
StopSoundDontWork, how to fix?
terwin,ctwin...

Last edited by Indarello; 03-26-2018 at 04:34.
Indarello is offline
0xBatuhan
Member
Join Date: Dec 2016
Location: Turkey
Old 07-31-2017 , 08:23   Re: [CS:GO] How to stop round end sounds
Reply With Quote #2

Maybe, you should be try https://forums.alliedmods.net/showthread.php?t=257874
0xBatuhan is offline
BraveFox
AlliedModders Donor
Join Date: May 2015
Location: Israel
Old 07-31-2017 , 09:01   Re: [CS:GO] How to stop round end sounds
Reply With Quote #3

Quote:
Originally Posted by 0xBatuhan View Post
Nope.
The round end sound is in the client's game.
__________________
Contact Me:
Steam: NoyB
Discord: Noy#9999
Taking Private Requests
BraveFox is offline
_GamerX
AlliedModders Donor
Join Date: Jun 2011
Location: Fun Server
Old 07-31-2017 , 09:17   Re: [CS:GO] How to stop round end sounds
Reply With Quote #4

Must create Timer on end round event and in timer repeating ClientCommand(i, "playgamesound Music.StopAllMusic");

for me this work
__________________
_GamerX is offline
Send a message via ICQ to _GamerX Send a message via Skype™ to _GamerX
vortex.
AlliedModders Donor
Join Date: Jan 2017
Location: OnGameFrame()
Old 08-01-2017 , 15:05   Re: [CS:GO] How to stop round end sounds
Reply With Quote #5

Umm, I have an idea. We can create a command like !stop. And the command will play a mp3 for client. Mp3 will be silent. So empty. So it will play a silent sound effect. This will stop other things that play.
__________________
vortex. is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 08-01-2017 , 16:36   Re: [CS:GO] How to stop round end sounds
Reply With Quote #6

try both:

playgamesound Music.StopAllExceptMusic
and
playgamesound Music.StopAllMusic

There's no reason to play a sound over the other sounds, this will cause lag for the clients.
Mitchell is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 08-05-2017 , 03:18   Re: [CS:GO] How to stop round end sounds
Reply With Quote #7

ClientCommand(i, "playgamesound Music.StopAllExceptMusic");
Stops music, but
it add strange knock sound for about 0.05 sec

Last edited by Indarello; 03-26-2018 at 07:23.
Indarello is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 03-23-2018 , 05:48   Re: [CS:GO] How to stop round end sounds
Reply With Quote #8

Code:
public Action:CS_OnTerminateRound(&Float:delay, &CSRoundEndReason:reason) 
{
	for( new i = 1; i < GetMaxClients(); i++ )
	{
		if (IsClientInGame(i) && !IsFakeClient(i))
		{
			ClientCommand(i, "playgamesound Music.StopAllExceptMusic"); 
			ClientCommand(i, "playgamesound common/null.wav");   //your sound path to play
		}	
	}
}
problems:
1)still you can hear terwin/ctwin for a bit, maybe try player_death?
2)can't change sound volume

Last edited by Indarello; 03-23-2018 at 16:34.
Indarello is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 03-26-2018 , 04:27   Re: [CS:GO] How to stop round end sounds
Reply With Quote #9

AHAHAHAHAH
Guys i know de wey
Code:
	...
	HookEvent("round_end", round_end, EventHookMode_Pre);
}
public Action round_end(Event E_Event, char[] C_Name, bool B_DontBroadcast) 
{
	//B_DontBroadcast = true;
	E_Event.BroadcastDisabled = true;
	
	CreateTimer(0.01, ForgivePoints, _, TIMER_FLAG_NO_MAPCHANGE);  //requestframe dont work

	return Plugin_Changed;
}

public Action:ForgivePoints(Handle:timer)
{
	for (new i = 1; i < MaxClients; i++)
	{
		if(IsClientInGame(i) && !IsFakeClient(i))
		{
			EmitSoundToClientAny(i, SoundName, _, _, _, _, 0.5);
		}	
	}	
}
thanks to https://forums.alliedmods.net/showpo...84&postcount=9

Last edited by Indarello; 03-27-2018 at 02:00.
Indarello is offline
evans
Senior Member
Join Date: May 2021
Location: OnSmokeDetonate();
Old 12-18-2023 , 13:46   Re: [CS:GO] How to stop round end sounds
Reply With Quote #10

You are probably only one who shared true working "de wey" in cs:go, hahaha, many thanks for this. Stopping default sounds and playing my own...
__________________
evans 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 09:26.


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