Raised This Month: $32 Target: $400
 8% 

[TF2] tHeadshotOnly v2.0.1 (2014.05.30)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author
Thrawn2
Veteran Member
Join Date: Apr 2009
Plugin ID:
1384
Plugin Version:
2.0.1
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    8 
    Plugin Description:
    Allows modifying the damage dealt by headshots
    Old 01-05-2010 , 06:56   [TF2] tHeadshotOnly v2.0.1 (2014.05.30)
    Reply With Quote #1

    Allows modifying the damage dealt by headshots and bodyshots with weapons that can actually do headshots.
    Uses SDKHooks.

    Cvars:
    Quote:
    Allows enabling/disabling the plugin
    • sm_theadshotonly_enable (default: 1)
    Quote:
    The location/name of the config file used for the modifiers.
    • sm_theadshotonly_cfgfile (default: tHeadshotOnly.cfg, which resolves to /tf/addons/sourcemod/configs/tHeadshotOnly.cfg)
    Quote:
    These control how much damage is being dealt when not zoomed in. (0.0 means no damage at all, 0.5 half, 1.0 full, 2.0 double and so on)
    • sm_theadshotonly_noscope_body (modifier for no-scope bodyshot damage dealt, default: 0.0, no-scopes deal no damage).
    • sm_theadshotonly_noscope_head (modifier for no-scope headshot damage dealt, default: 1.0, no-scopes deal normal damage).
    Quote:
    By enabling this the attacker will see the miss particle when hitting a body part. There are no other notifications.
    • sm_theadshotonly_particle (default: 1, only shows when the damage modifier of the weapon is set to 0.0 to avoid mixed visual feedback)
    Config file details:
    The config file is being generated/updated with new weapons automatically. This is just a snapshot of the file generated on 2014-05-29 and might not include all weapons that are available today.
    Code:
    "tHeadshotOnly"
    {
    	"Weapons without scope"
    	{
    		"The Ambassador"				"1"
    		"Festive Ambassador"				"1"
    		"The Huntsman"					"1"
    		"Festive Huntsman"				"1"
    		"The Fortified Compound"			"1"
    	}
    	"Bodyshot Modifiers"
    	{
    		"TF_WEAPON_SNIPERRIFLE"				"0.000000"
    		"Upgradeable TF_WEAPON_SNIPERRIFLE"		"0.000000"
    		"Festive Sniper Rifle 2011"			"0.000000"
    		"Silver Botkiller Sniper Rifle Mk.I"		"0.000000"
    		"Gold Botkiller Sniper Rifle Mk.I"		"0.000000"
    		"Rust Botkiller Sniper Rifle Mk.I"		"0.000000"
    		"Blood Botkiller Sniper Rifle Mk.I"		"0.000000"
    		"Carbonado Botkiller Sniper Rifle Mk.I"		"0.000000"
    		"Diamond Botkiller Sniper Rifle Mk.I"		"0.000000"
    		"Silver Botkiller Sniper Rifle Mk.II"		"0.000000"
    		"Gold Botkiller Sniper Rifle Mk.II"		"0.000000"
    
    		"The Bazaar Bargain"				"0.000000"
    		"The Machina"					"0.000000"
    		"The Hitman's Heatmaker"			"0.000000"
    		"The AWPer Hand"				"0.000000"
    		
    		"The Ambassador"				"1.000000"
    		"Festive Ambassador"				"1.000000"
    		
    		"The Huntsman"					"0.000000"
    		"Festive Huntsman"				"0.000000"
    		"The Fortified Compound"			"0.000000"
    	}
    	"Headshot Modifiers"
    	{
    		"TF_WEAPON_SNIPERRIFLE"				"1.000000"
    		"Upgradeable TF_WEAPON_SNIPERRIFLE"		"1.000000"
    		"Festive Sniper Rifle 2011"			"1.000000"
    		"Silver Botkiller Sniper Rifle Mk.I"		"1.000000"
    		"Gold Botkiller Sniper Rifle Mk.I"		"1.000000"
    		"Rust Botkiller Sniper Rifle Mk.I"		"1.000000"
    		"Blood Botkiller Sniper Rifle Mk.I"		"1.000000"
    		"Carbonado Botkiller Sniper Rifle Mk.I"		"1.000000"
    		"Diamond Botkiller Sniper Rifle Mk.I"		"1.000000"
    		"Silver Botkiller Sniper Rifle Mk.II"		"1.000000"
    		"Gold Botkiller Sniper Rifle Mk.II"		"1.000000"
    
    		"The Bazaar Bargain"				"1.000000"
    		"The Machina"					"1.000000"
    		"The Hitman's Heatmaker"			"1.000000"
    		"The AWPer Hand"				"1.000000"
    
    		"The Ambassador"				"1.000000"
    		"Festive Ambassador"				"1.000000"
    
    		"The Huntsman"					"1.000000"		
    		"Festive Huntsman"				"1.000000"
    		"The Fortified Compound"			"1.000000"
    	}
    }
    Note:
    This plugin does not work correctly if you set the critchance to 100% and are running a version of SDKHooks earlier than 2.1.

    Credits to:
    • Duke for his TempEnts Particle Function.
    • Tsunami for SDKHooks
    • psychonic for additional suggestion + sdkhooks2 + sdkhooks 2.1 ;)
    • cybersquare420 found two nasty bugs
    • CynderWolf for reminding me to add the bazaar bargain
    • Jameless for providing some fixes

    Changelog:
    A more detailed changelog can be found on here.
    2.0.0
    - Rewrite, no more hardcoded values.
    1.1.5
    - More skins
    1.1.3
    - added the 'Hitmans Heatmaker' and the 'AWPer Hand'
    1.1.2
    - added the 'Festive Sniper Rifle'.
    1.1.1
    - fixed clients having no active weapon, but still doing damage, spam the console.
    - removed additional build only DREAD_XI was using. i cba to do everything twice.
    1.1.0
    - updated to use sdkhooks 2.1 and therefore changed headshot detection (thanks to psychonic)
    - added machina, sidney sleeper and noscope cvars.
    1.007
    - fixed bazaar bargain stuff. (thx to CynderWolf for reporting)
    1.006
    - included bazaar bargain
    1.005
    - fixed for sdkhooks2
    1.004
    - removed upper limit (1.0) for the multiplier cvars (requested here)
    1.003
    - same for the inflictor.
    1.002
    - it's not enough to check if attacker > 0. obviously. fixed.
    1.001
    - Changed boolean cvars to float to be used as a modifier for the damage hook.
    1.000
    - Initial Release
    Attached Files
    File Type: cfg theadshotonly.cfg (1.9 KB, 1158 views)
    File Type: sp Get Plugin or Get Source (tHeadshotOnly.sp - 975 views - 17.3 KB)
    File Type: smx tHeadshotOnly.smx (11.4 KB, 962 views)

    Last edited by Thrawn2; 05-30-2014 at 07:45. Reason: update to 2.0.1 (rewrite, removed hardcoded values)
    Thrawn2 is offline
     


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 03:38.


    Powered by vBulletin®
    Copyright ©2000 - 2024, vBulletin Solutions, Inc.
    Theme made by Freecode