View Single Post
Author Message
WakiMiko
Junior Member
Join Date: Jun 2009
Old 06-23-2009 , 21:06   [TF2] Bodyshot Punishment
Reply With Quote #1

Hey guys, this is a really simple plugin that can automatically punish snipers who are only going for bodyshots.

That doesn't mean that bodyshots are bad, I'm not trying change the gameplay or anything, the idea just popped into my head when dicking around with some fellow snipers on a private server and I thought it would be a fun thing to have.

It only counts bodyshots that actually kill and can be set to slay, slap or kick the offender. The admin can choose how many bodyshots are required to trigger the action, and whether or not headshots reset this counter. It can also play a sound file to all players upon punishment.

This is my first plugin and the first time I've programmed in sourcepawn, so feedback and tips are more than welcome!


CVars:
sm_bs_action (0/1, default: 0)
Action to perform against offenders: 0 = slay, 1 = slap (see sm_bs_slap_damage), 2 = kick

sm_bs_count (int, default: 1)
Trigger action after this many violations, 0 to disable plugin

sm_bs_reset (0/1, default: 0)
Whether or not the violation counter should be reset after each headshot

sm_bs_slap_damage (int, default: 50)
The damage to slap offenders with if sm_bs_action is set to 1

sm_bs_sound (0/1, default 1)
Whether or not to play a sound file to all players when somebody gets punished.

edit: Hmmm, description and version fields dont seem to work.
Attached Files
File Type: sp Get Plugin or Get Source (bodyshot.sp - 3021 views - 4.4 KB)
File Type: 7z bodyshot%20punishment%20v0.2.7z (26.7 KB, 1922 views)

Last edited by WakiMiko; 06-25-2009 at 20:10.
WakiMiko is offline