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

Sound Fixer (echo bug like on cs_seige)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands        Approver:   GHW_Chronic (70)
Throstur
Senior Member
Join Date: Nov 2004
Location: Iceland
Old 07-11-2006 , 08:21   Sound Fixer (echo bug like on cs_seige)
Reply With Quote #1

Ever been on a map like cs_seige where the sound goes ballistic and you hear the cave echo everywhere?

Well, I've got a fix!

This simple plugin will automatically remove the env_sound entities (which ARE responsable for the echo effect by the way)

And not only that!
If the plugin somehow fails, or if the player does it to himself somehow, or if the plugin is disabled, the player can fix it himself! (with a say command.)

Commands:
Code:
amx_cvar amx_soundfix 1		//	enable env_sound removal
amx_cvar amx_soundfix_pallow 1	//	enable player to fix it himself
amx_cvar soundfix		//	removes env_sound entities if plugin is enabled

say /fixsound			// 	Fixes broken sound for the player.
Cvars:
Code:
amx_soundfix 1			//	enable env_sound removal
amx_soundfix_pallow 1		//	enable player to fix it himself
Updated to now using pcvars.

This happens on fun_allinone aswell.

THE ENGINE MODULE IS REQURED!

---

Sound Fixer Mini has been released, it is a good plugin for those servers who wish to hide the effects of plugins as much as possible. It simply fixes the sound at a certain time so if the player encounters the bug, he/she is not stuck with it for the rest of the session, instead the player can either say /fixsound (if admin allows it) or the player can wait until he spawns again.
Cvars: amx_soundfix_pallow changes to amx_msoundfix_pallow - amx_soundfix changes to amx_msoundfix
Engine module not required for mini version.
Attached Files
File Type: sma Get Plugin or Get Source (soundfix.sma - 3376 views - 1.1 KB)
File Type: sma Get Plugin or Get Source (soundfix_b0.sma - 2432 views - 860 Bytes)
__________________

Last edited by Throstur; 07-07-2007 at 15:46.
Throstur is offline
Send a message via AIM to Throstur Send a message via MSN to Throstur
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-11-2006 , 09:02   Re: Sound Fixer (echo bug like on cs_seige)
Reply With Quote #2

Hum..

Quote:
Plugin failed to compile! Please try contacting the author.

Welcome to the AMX Mod X 1.75-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team

/home/groups/alliedmodders/forums/files/2/8/4/4/8967.attach(43) : warning 217: loose indentation
/home/groups/alliedmodders/forums/files/2/8/4/4/8967.attach(45) : warning 217: loose indentation
/home/groups/alliedmodders/forums/files/2/8/4/4/8967.attach(45) : error 029: invalid expression, assumed zero

1 Error.
Could not locate output file /home/groups/amxmodx/public_html/compiled3/8967.amx (compile failed).
:p
Arkshine is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 07-11-2006 , 09:12   Re: Sound Fixer (echo bug like on cs_seige)
Reply With Quote #3

Code:
//thanks [BSP] Thijs for making the door removal plugin.

/*
Ever been on a map like cs_seige where the sound goes ballistic and you hear the cave echo everywhere?

Well, I've got a fix!

This plugin will automatically remove the 'env_sound' entities (which ARE responsable for the echo effect by the way)

*/

#include <amxmodx>
#include <amxmisc>
#include <engine>


public plugin_init()
{
	register_plugin("Fix Echo Sounds","1.0","Throstur")
	register_cvar("amx_soundfix","1")
	register_cvar("amx_soundifx_pallow","1")
	register_clcmd("say /fixsound","cmdStopsound")
	register_srvcmd("soundfix","fRemove")
	
	set_task(0.1,"fRemove")
}

public fRemove()
{
	if(!get_cvar_num("amx_soundfix"))
		return PLUGIN_HANDLED

	new Echo
	while(Echo == find_ent_by_class(Echo,"env_sound"))
		remove_entity(Echo)

	return PLUGIN_HANDLED
}

public cmdStopsound(id)
{
	if(get_cvar_num("amx_fixsound_pallow"))
	{
		client_cmd(id,"stopsound;room_type 00")
		client_cmd(id,"stopsound")
		client_print(id,print_chat,"[AMXX] Your sound will no longer echo now.")
	}
	else
	{
		client_print(id,print_chat,"[AMXX] I'm sorry, manual sound fixing is disabled.")
		return PLUGIN_HANDLED
	}

	return PLUGIN_CONTINUE
}
Deviance is offline
Egarim
Member
Join Date: Jul 2006
Location: TheWorld (but not this o
Old 07-11-2006 , 10:27   Re: Sound Fixer (echo bug like on cs_seige)
Reply With Quote #4

[attachment removed]

Looks nice,
but I've seen this before somewhere else...
Was it an amxmod plugin maybe?
__________________
Give me where to stand, and I will move the earth.
-Archimedes

Last edited by Egarim; 07-11-2006 at 15:49.
Egarim is offline
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 07-11-2006 , 12:01   Re: Sound Fixer (echo bug like on cs_seige)
Reply With Quote #5

Quote:
Originally Posted by Egarim
Tried to fix it, tell me if it works...
No errors compiling it
looks nice Throstur
omg i had already fixed it :/

btw Throstur, you should use get_pcvar_num instead of get_cvar_num ;)

Last edited by Deviance; 07-11-2006 at 12:05.
Deviance is offline
Throstur
Senior Member
Join Date: Nov 2004
Location: Iceland
Old 07-11-2006 , 13:12   Re: Sound Fixer (echo bug like on cs_seige)
Reply With Quote #6

OK I've fixed it. I'd rather use cvar instead of pcvar, as I dont know what pcvars do differently.
__________________
Throstur is offline
Send a message via AIM to Throstur Send a message via MSN to Throstur
Deviance
Veteran Member
Join Date: Nov 2004
Location: Sweden
Old 07-11-2006 , 13:15   Re: Sound Fixer (echo bug like on cs_seige)
Reply With Quote #7

Quote:
Originally Posted by Throstur
OK I've fixed it. I'd rather use cvar instead of pcvar, as I dont know what pcvars do differently.
pcvar is faster then get_cvar_num, and you get a bigger chanse to get this approved

Code:
//thanks [BSP] Thijs for making the door removal plugin.

/*
Ever been on a map like cs_seige where the sound goes ballistic and you hear the cave echo everywhere?

Well, I've got a fix!

This plugin will automatically remove the 'env_sound' entities (which ARE responsable for the echo effect by the way)

*/

#include <amxmodx>
#include <amxmisc>
#include <engine>

new cvar, pallow

public plugin_init()
{
	register_plugin("Fix Echo Sounds","1.0","Throstur")
	cvar = register_cvar("amx_soundfix","1")
	pallow = register_cvar("amx_soundifx_pallow","1")
	register_clcmd("say /fixsound","cmdStopsound")
	register_srvcmd("soundfix","fRemove")
	
	set_task(0.1,"fRemove")
}

public fRemove()
{
	if(get_pcvar_num(cvar) < 1)
		return PLUGIN_HANDLED

	new Echo
	while(Echo == find_ent_by_class(Echo,"env_sound"))
		remove_entity(Echo)

	return PLUGIN_HANDLED
}

public cmdStopsound(id)
{
	if(get_pcvar_num(pallow) == 1)
	{
		client_cmd(id,"stopsound;room_type 00")
		client_cmd(id,"stopsound")
		client_print(id,print_chat,"[AMXX] Your sound will no longer echo now.")
	}
	else
	{
		client_print(id,print_chat,"[AMXX] I'm sorry, manual sound fixing is disabled.")
		return PLUGIN_HANDLED
	}

	return PLUGIN_CONTINUE
}

Last edited by Deviance; 07-11-2006 at 13:18.
Deviance is offline
ThomasNguyen
Senior Member
Join Date: May 2006
Old 07-11-2006 , 14:11   Re: Sound Fixer (echo bug like on cs_seige)
Reply With Quote #8

Nice! 5/5
__________________
ThomasNguyen is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 07-11-2006 , 15:36   Re: Sound Fixer (echo bug like on cs_seige)
Reply With Quote #9

I could've swore that this was already made.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
BACARRA
Senior Member
Join Date: Mar 2005
Old 07-11-2006 , 16:52   Re: Sound Fixer (echo bug like on cs_seige)
Reply With Quote #10

or you can type room_type 1 in console
BACARRA 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 04:50.


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