View Single Post
Author Message
XARIUS
SourceMod Donor
Join Date: May 2008
Location: Atlanta, GA
Old 10-10-2008 , 10:37   Headshot Only (Updated: v1.0.1, 10/12/08)
Reply With Quote #1

General:

I saw someone bumped a thread in Unapproved regarding a headshot only plugin. Here ya go.

Info:

This plugin will prevent all damage except headshots! It uses some built in HL2 sounds for the headshot effects. No downloading or adding sounds is required. You can choose to have these sounds emitted ambiently to all players from the victim, or have them played only to the attacker. Either way, it's a fun way to indicate a headshot. You can also choose to use your own sounds instead of the ones I've included in the code.

Usage:

Sit back and have fun.

Installation:
  • Copy headshotonly.smx to addons/sourcemod/plugins/
  • Copy headshotonly.sp to addons/sourcemod/scripting/
  • Copy headshotonly.phrases.txt to addons/sourcemod/translations/
  • Optional custom sounds go in /sound/headshotonly/
  • headshotonly.cfg will automatically be created in /cfg/sourcemod/
Configuration:
  • sm_headshotonly_enabled - Enables or disables this plugin. (Default: 1)
  • sm_headshotonly_useambient - Use ambient headshot sounds. 0 = Emit sound from victim only to attacker. (Default: 1)
  • sm_headshotonly_sounds - Sound files used to indicate headshots. (Max: 5) Leave blank for default sounds.
Notes:

There is an odd issue when CS calculates armor damage. Even when body shots occur, you will lose one armor point per body shot.

The default sounds are kinda cool. They're squishy fleshy melon crushing sounds from HL2 which go well with getting shot in the head. If you decide to use your own sounds, the default squishy sounds won't be used. I feel like less of a man using the word squishy so much.

Changelog:

Version 1.0.1:

Minor code cleanup. Allow damage from world (falls etc..)

Version 1.0:

Public Release.

Known Issues:

None that I know of!
Attached Files
File Type: txt headshotonly.phrases.txt (165 Bytes, 6919 views)
File Type: sp Get Plugin or Get Source (headshotonly.sp - 15363 views - 5.3 KB)
File Type: zip headshotonly.zip (8.6 KB, 17659 views)
__________________

Last edited by XARIUS; 10-12-2008 at 11:27.
XARIUS is offline