View Single Post
Author Message
TnTSCS
AlliedModders Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 07-28-2011 , 09:45   Suicide Intercept
Reply With Quote #1

DESCRIPTION:
This plugin is the result of a request by wazzgod - he had the idea of a plugin that would intercept player suicides and instead of instant death, have it be a delayed death (http://forums.alliedmods.net/showthread.php?t=162870)

I know I get frustrated when I'm about to get a kill stat and they kill themselves, robbing me of a stat. Well, this plugin will delay that request, notify the player of the intercept via chat and center chat, and if they survive my attack somehow, they'll be slain anyways after X seconds (set in config file SuicideIntercept.plugin.cfg in cstrike/cfg/sourcemod).

This plugin will intercept player suicide attempts by capturing the following commands
* kill
* jointeam
* joinclass
* spectate
* explode
Plugin can be en/disabled via cvar sm_suicideintercept_enabled 1/0
Configurable number of delay seconds to carry out players requested suicide.

By default, ROOT admins are immune to the delays this plugin imposes. If you'd like to grant other admin flags immunity to this plugin, just add the following in the admin_overrides.cfg

"bypass_suicideintercept" "abo"

The above would allow those players with flags "a" "b" AND "o" immunity from delays this plugin imposes.

CVARS


REQUIREMENTS:
Plugin was compiled with SourceMod 1.4.0 1.3.8 and has includes of <sourcemod> and <sdktools> and <colors>

OPTIONAL:
Updater plugin if you want this plugin to stay updated with changes and bug fixes.

CREDITS:
wazzgod for idea (REQ thread) - he posted one, but requested I post mine for approval (here)

KyleS for the suggestions on cleaning up the code :)

INSTALLATION:
- Put the SMX in your cstrike/addons/sourcemod/plugins folder
- Put the SuicideIntercept.phrases.txt in your cstrike/addons/sourcemod/translations folder
- Either manually start the plugin, change the map, or restart your server
--------------------------
Thanks again to wazzgod for the idea!! I hope people find this plugin useful and fun.

BTW, the reason I included joinclass as a suicide command to intercept is because Zombie:Reloaded uses it and this plugin "could" be used with that mod if you wanted to delay the suicide instead of outright blocking it (which is an option in ZR)

If you find a bug, post it here and I'll jump on it. If there are additional commands players can type to suicide, post it here and I'll add them.

CHANGE LOG

NOTES:
You'll have to download the attached .smx file because the web compiler cannot compile due to the <colors> include. I've attached that .inc file as well if you want to recompile yourself.

Version 1.5.6
+ Added ability to disable immunity

UPGRADING?
You'll need to get the updated translation file as well - I've added a bunch of different phrases in there since 1.4b.

You should backup your config file and let the plugin create a new one, then edit the one it creates since I added a new CVar as of 1.5.6

If you have Updater, the plugin will auto-update itself if you have the CVar set to 1
Attached Files
File Type: txt SuicideIntercept.phrases.txt (2.6 KB, 1116 views)
File Type: sp Get Plugin or Get Source (SuicideIntercept.sp - 1122 views - 23.5 KB)
File Type: smx SuicideIntercept.smx (11.1 KB, 791 views)
__________________
View my Plugins | Donate

Last edited by TnTSCS; 07-23-2012 at 16:31. Reason: Update from 1.5.5 to 1.5.6
TnTSCS is offline