Raised This Month: $150 Target: $400
 37% 

[TF2] tHeadshotOnly v2.0.1 (2014.05.30)


Post New Thread Reply   
 
Thread Tools Display Modes
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:
    35 
    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, 425 views)
    File Type: sp Get Plugin or Get Source (tHeadshotOnly.sp - 258 views - 17.3 KB)
    File Type: smx tHeadshotOnly.smx (11.4 KB, 417 views)

    Last edited by Thrawn2; 05-30-2014 at 07:45. Reason: update to 2.0.1 (rewrite, removed hardcoded values)
    Thrawn2 is offline
    cybersquare420
    Veteran Member
    Join Date: Nov 2008
    Old 01-05-2010 , 08:45   Re: [TF2] tHeadshotOnly v1.000 (2010.01.05)
    Reply With Quote #2

    THANX for THIS!!!!
    __________________
    cybersquare420 is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 01-05-2010 , 09:08   Re: [TF2] tHeadshotOnly v1.000 (2010.01.05)
    Reply With Quote #3

    Request:
    Change the enable/disable cvar for each weapon to a float to be used as a modifier for body-shot damage.

    Like:
    0.0 - No damage
    0.5 - Half damage
    1.0 - Full damage (disabled)
    psychonic is offline
    Thrawn2
    Veteran Member
    Join Date: Apr 2009
    Old 01-05-2010 , 11:26   Re: [TF2] tHeadshotOnly v1.001 (2010.01.05)
    Reply With Quote #4

    although this turns around my cvars (0 becomes 1.0 and 1 becomes 0.0) its a welcome suggestion.
    i've updated the plugin accordingly.
    Thrawn2 is offline
    cybersquare420
    Veteran Member
    Join Date: Nov 2008
    Old 01-06-2010 , 22:05   Re: [TF2] tHeadshotOnly v1.001 (2010.01.05)
    Reply With Quote #5

    log spam:

    L 01/06/2010 - 22:04:02: [SM] Native "GetClientWeapon" reported: Client index 103 is invalid
    L 01/06/2010 - 22:04:02: [SM] Displaying call stack trace for plugin "tHeadshotOnly.smx":
    L 01/06/2010 - 22:04:02: [SM] [0] Line 61, tHeadshotOnly.sp::OnTakeDamage()
    __________________
    cybersquare420 is offline
    Thrawn2
    Veteran Member
    Join Date: Apr 2009
    Old 01-07-2010 , 01:44   Re: [TF2] tHeadshotOnly v1.002 (2010.01.07)
    Reply With Quote #6

    facepalm
    obvious bug is fixed
    Thrawn2 is offline
    cybersquare420
    Veteran Member
    Join Date: Nov 2008
    Old 01-07-2010 , 21:52   Re: [TF2] tHeadshotOnly v1.002 (2010.01.07)
    Reply With Quote #7

    more spam...
    L 01/07/2010 - 21:43:26: [SM] Native "GetPlayerWeaponSlot" reported: Entity index 358 is not a valid client
    L 01/07/2010 - 21:43:26: [SM] Displaying call stack trace for plugin "tHeadshotOnly.smx":
    L 01/07/2010 - 21:43:26: [SM] [0] Line 78, tHeadshotOnly.sp::OnTakeDamage()
    __________________
    cybersquare420 is offline
    Thrawn2
    Veteran Member
    Join Date: Apr 2009
    Old 01-08-2010 , 01:12   Re: [TF2] tHeadshotOnly v1.003 (2010.01.08)
    Reply With Quote #8

    fixed
    Thrawn2 is offline
    Senapi
    Junior Member
    Join Date: Jan 2010
    Old 03-15-2010 , 23:58   Re: [TF2] tHeadshotOnly v1.004 (2010.02.15)
    Reply With Quote #9

    I can't this working on my server could someone please help me
    Senapi is offline
    Thrawn2
    Veteran Member
    Join Date: Apr 2009
    Old 03-16-2010 , 08:28   Re: [TF2] tHeadshotOnly v1.004 (2010.02.15)
    Reply With Quote #10

    more details pls.
    do you have sdkhooks installed?
    please post the output of sm exts list and sm plugins list
    Thrawn2 is offline
    Reply


    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 23:04.


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