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

[CS:GO] Remove helicopter sound


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Newbie1992
Senior Member
Join Date: Jan 2013
Location: Germany
Old 05-02-2015 , 12:28   [CS:GO] Remove helicopter sound
Reply With Quote #1

Hi,

As the title said is there any plugin where I can remove this annoying helicopter sounds on round start?

Game: CS:GO

Thanks,
Newbie1992
__________________
Newbie1992 is offline
Chokitu
Senior Member
Join Date: Oct 2013
Old 05-02-2015 , 17:52   Re: [CS:GO] Remove helicopter sound
Reply With Quote #2

Add me in skype chokitu3
Chokitu is offline
Send a message via Skype™ to Chokitu
Darkness_
Veteran Member
Join Date: Nov 2014
Old 05-02-2015 , 18:06   Re: [CS:GO] Remove helicopter sound
Reply With Quote #3

What's the name of the sound file?
Darkness_ is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 05-02-2015 , 18:38   Re: [CS:GO] Remove helicopter sound
Reply With Quote #4

Stripper config it out.
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.
Dr. Greg House is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 05-02-2015 , 22:51   Re: [CS:GO] Remove helicopter sound
Reply With Quote #5

You could try using an rpg
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 05-03-2015 , 00:45   Re: [CS:GO] Remove helicopter sound
Reply With Quote #6

funy
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.
Dr. Greg House is offline
Chokitu
Senior Member
Join Date: Oct 2013
Old 05-05-2015 , 08:33   Re: [CS:GO] Remove helicopter sound
Reply With Quote #7

Quote:
#pragma semicolon 1

#include <sourcemod>
#include <sdktools>

#define PLUGIN_NAME "Stop Map Music"
#define PLUGIN_VERSION "1.0.0"

#define MAX_EDICTS 2048

new Float:g_fCmdTime[MAXPLAYERS+1];
new g_iSoundEnts[MAX_EDICTS];
new g_iNumSounds;

public Plugin:myinfo =
{
name = PLUGIN_NAME,
author = "GoD-Tony",
description = "Allows clients to stop ambient sounds played by the map",
version = PLUGIN_VERSION,
url = "http://www.sourcemod.net/"
};

public OnPluginStart()
{
CreateConVar("sm_stopmusic_version", PLUGIN_VERSION, "Stop Map Music", FCVAR_PLUGIN|FCVAR_NOTIFY|FCVAR_DONTRECORD);

HookEvent("round_start", Event_RoundStart, EventHookMode_PostNoCopy);

RegConsoleCmd("sm_stopmusic", Command_StopMusic, "Stops map music");
}

public OnClientDisconnect_Post(client)
{
g_fCmdTime[client] = 0.0;
}

public Event_RoundStart(Handle:event, const String:name[], bool:dontBroadcast)
{
// Ents are recreated every round.
g_iNumSounds = 0;

// Find all ambient sounds played by the map.
decl String:sSound[PLATFORM_MAX_PATH];
new entity = INVALID_ENT_REFERENCE;

while ((entity = FindEntityByClassname(entity, "ambient_generic")) != INVALID_ENT_REFERENCE)
{
GetEntPropString(entity, Prop_Data, "m_iszSound", sSound, sizeof(sSound));

new len = strlen(sSound);
if (len > 4 && (StrEqual(sSound[len-3], "mp3") || StrEqual(sSound[len-3], "wav")))
{
g_iSoundEnts[g_iNumSounds++] = EntIndexToEntRef(entity);
}
}
}

public Action:Command_StopMusic(client, args)
{
// Prevent this command from being spammed.
if (!client || g_fCmdTime[client] > GetGameTime())
return Plugin_Handled;

g_fCmdTime[client] = GetGameTime() + 5.0;

PrintToChat(client, "[SM] Stopping map music...");

// Run StopSound on all ambient sounds in the map.
decl String:sSound[PLATFORM_MAX_PATH], entity;

for (new i = 0; i < g_iNumSounds; i++)
{
entity = EntRefToEntIndex(g_iSoundEnts[i]);

if (entity != INVALID_ENT_REFERENCE)
{
GetEntPropString(entity, Prop_Data, "m_iszSound", sSound, sizeof(sSound));
Client_StopSound(client, entity, SNDCHAN_STATIC, sSound);
}
}

return Plugin_Handled;
}

/**
* Stops a sound for one client.
*
* @param client Client index.
* @param entity Entity index.
* @param channel Channel number.
* @param name Sound file name relative to the "sounds" folder.
* @noreturn
*/
stock Client_StopSound(client, entity, channel, const String:name[])
{
EmitSoundToClient(client, name, entity, channel, SNDLEVEL_NONE, SND_STOP, 0.0, SNDPITCH_NORMAL, _, _, _, true);
}
Chokitu is offline
Send a message via Skype™ to Chokitu
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 05:06.


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