Raised This Month: $ Target: $400
 0% 

HeadShot Only [Version 1.2a]


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Gameplay       
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 01-06-2009 , 18:01   HeadShot Only [Version 1.2a]
Reply With Quote #1

Enables/Disables headshot only hits.

Command:
  • amx_hsonly 1 or 0 - toggles the plugin on (1) or off (0).
CVars:
  • hsonly_knife - If set to 0, players can hit anywhere on the body with knives.
  • hsonly_t - If set to 1, players can only hit Ts with headshot(s). 0 means hits on all body.
  • hsonly_ct - If set to 1, players can only hit CTs with headshot(s). 0 means hits on all body.
NOTE: Pretty obviously - Setting both hsonly_t and hsonly_ct to 0 will cause in plugin disability!
ChangeLog:
Quote:
Originally Posted by ChangeLog
Version 1.0 -
  • First public release.
Version 1.1 -
  • Supports friendlyfire.
  • Code optimized by arkshine.
Version 1.2 -

  • Changed toggle command and fixed [En|Dis]abling HamSandwich forwards(thanks Connor!).
  • Added a cvar to set if knife hits should be counted.
  • Added a cvar to set if Ts can only get hit by a headshot.
  • Added a cvar to set if CTs can only get hit by a headshot.
  • Now displays a message to connecting people that announces that the server is running the plugin.
Version 1.2a -
  • Extremely minor fix: Fixed blocking the attack if not headshot even if the attacker is not a player.
Attached Files
File Type: sma Get Plugin or Get Source (hsonly.sma - 7453 views - 1.7 KB)

Last edited by Dores; 01-24-2009 at 11:38. Reason: Version 1.2a
Dores is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 01-06-2009 , 18:02   Re: HeadShot Only
Reply With Quote #2

http://forums.alliedmods.net/showthread.php?p=390337

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 01-06-2009 , 18:26   Re: HeadShot Only
Reply With Quote #3

Quote:
Originally Posted by Exolent[jNr] View Post
whatever. that's his plugin, and that's mine.
unapprove if you have to.
Dores is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-06-2009 , 18:41   Re: HeadShot Only
Reply With Quote #4

Why do you use free_tr2() ? Is it not supposed to be used to free the handle created from create_tr2() ?

Why do you create a var ?

Is it not enough something like ? :

Code:
    if ( g_bOn && id != attacker && get_tr2( tr, TR_iHitgroup ) != HIT_HEAD )     {         return HAM_SUPERCEDE;     }     return HAM_IGNORED;
Arkshine is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 01-06-2009 , 18:44   Re: HeadShot Only
Reply With Quote #5

Quote:
Originally Posted by arkshine View Post
Why do you use free_tr2() ? Is not supposed to be used to free the handle created from create_tr2() ?

Why do you create a var ?

Is it not enough something like ?
i didn't think when i coded it. i just wanted people here to find a simple working plugin. and this one works great, so what difference does it make?
If you're gonna unapprove this, sad for the admins who really want this.
Dores is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 01-06-2009 , 19:16   Re: HeadShot Only
Reply With Quote #6

Quote:
so what difference does it make?
I don't see the purpose to use that when it's not need. Oo ; you add code when whant I quoted is enough... free_tr2() should be used only with create_tr2().

Quote:
If you're gonna unapprove this, sad for the admins who really want this.
Sad for that ? If unapproved, it's still available. I don't see the problem here. If you want to be approved, maybe should you start to extend the plugin functionnality.

Last edited by Arkshine; 01-06-2009 at 19:24.
Arkshine is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 01-06-2009 , 23:27   Re: HeadShot Only
Reply With Quote #7

I think Dores needs some Anti-depressants!

Come on Dores, you help out a ton, not everybody scrips this. Keep it up!
__________________
bmann_420 is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 01-07-2009 , 07:35   Re: HeadShot Only [Version 1.1]
Reply With Quote #8

thanks bmann. you're the mann.

updated version 1.1 - arkshine improved code... cuz mine sucked.
Dores is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 01-07-2009 , 09:58   Re: HeadShot Only [Version 1.1]
Reply With Quote #9

Dores... Ye, Maybe I should say something smart, don't really know... Anyway GW, specially here: 999 Bytes
SnoW is offline
Send a message via MSN to SnoW
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 01-07-2009 , 14:52   Re: HeadShot Only [Version 1.1]
Reply With Quote #10

Quote:
Originally Posted by SnoW View Post
Dores... Ye, Maybe I should say something smart, don't really know... Anyway GW, specially here: 999 Bytes
Thanks.
It's 999 bytes thanks to arkshine, mine was about 1.3k.
Also, you don't need to say anything. But still thanks.
Dores is offline
Reply



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


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