This was originally just a workaround to avoid a crash with mani's spawn protection alongside my KnifeMug plugin, but I'm releasing it anyway.
If a player attacks a team mate in any time from the freeze time end (start of the round) until the sm_protecttime is up, the attacker will be slain and the victim will have his health restored.
REQUIREMENTS:
CVARS:- sm_protecttime
- Sets the time before players can team attack without getting slain
- Default Values: Anywhere from 1 to 30
If you wish to turn off the plugin (but keep it loaded), set sm_protecttime to 0
CHANGELOG:- 1.0.2
- Added effects and sounds to the slay - now REQUIRES PimpinJuices TempEnts extension
- Fixed some errors that occurred when handling bots
- Fixed an error involving the server trying to handle itself as a player
- Added console output for slaying
- 1.0.1
- Updated to utilize GetUserOfId instead of FindEntityOfUserId function
- Fixed plugin not "turning back on" after being off
- 1.0.0
Thank you to everyone who helped out on this
. I could list, but you know who you are.
And of course thanks to BAILOPAN, DamagedSoul, and the rest of the SourceMod dev team for working out a few snags I hit.
More thanks: PimpinJuice for his tempents extension, Olly (testing/pointing out bugs), sslice, DaveB, LDuke (telling me what needed to be precached for effects), and the magical pixie goblins.
Thank you to
GameConnect for allowing me to test this on their servers.