View Single Post
Author Message
Hell Phoenix
Senior Member
Join Date: Jan 2005
Old 07-06-2007 , 12:16   Swear Replacement/Filter
Reply With Quote #1

Swear Replacement
Hell Phoenix
http://www.charliemaurice.com/plugins

This plugin is based on kaboomkazoom's amxx swear replacement plugin. It allows you to do 3 different replacement
modes. It also sends a warning to the user that foul language is not allowed. It also checks a players name to
make sure that it doesnt have any bad words in it.

Mode 1 replaces what the user said with a random phrase.
Mode 2 shows just **** (or whatever you set the cvar to) instead of the word (filters it)
Mode 3 doesnt display the users chat at all


Versions:
1.0
* First Public Release!
1.1
* Added Insurgency Mod Support!
* Added Cvar to turn off name checking
* Added custom word replacement (use mode 2)
* Changed Maxplayers from a define to GetMaxClients();
* Log now only logs the original message
* Team say now stays in the team chat instead of getting moved to global chat
1.2
* Fixed some errors from the console/log
1.3
* Fixed crashing
1.4
* Fixed a major loop that caused crashes sometimes (thanks Bailopan)

Todo:

Notes:
The client name doesnt appear in the team color for any mod other than Insurgency. Not sure this will ever be possible
to fix. The only thing you can do if you dont want the persons name to show up all white is to use mode 3 and not
allow it to show at all.

Make sure that badwords.txt and replacements.txt are in your sourcemod/configs/ directory!

Cvarlist (default value):
sm_swear_replace_mode 1 <1|2|3> are valid options
sm_swear_name_check 1 <0|1> are valid options
sm_swear_replace **** <change this to whatever string you want to replace the word if you dont want stars (for mode 2)>

Admin Commands:
None
Attached Files
File Type: sp Get Plugin or Get Source (swear_replacement.sp - 8966 views - 11.4 KB)
File Type: txt replacements.txt (904 Bytes, 5488 views)
File Type: txt badwords.txt (1.3 KB, 5547 views)
__________________

Last edited by Hell Phoenix; 09-30-2007 at 18:35.
Hell Phoenix is offline