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

HitZones Manager v0.0.4 ( 09/06/2014 )


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Fun Stuff        Approver:   Backstabnoob (7)
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 06-07-2014 , 02:11   HitZones Manager v0.0.4 ( 09/06/2014 )
Reply With Quote #1


v0.0.4
By Blizzard_87

ThreadStart

With this plugin you can customly change the damage percent on each individual hitzone for each team using the cvars provided.
by default "100" is 100% damage ( normal ), "50" would be half normal damage, and 200 or higher would be double amount of damage or more.
you can enable or disable a certain hitzone by using the cvar provided.
also enable of disable a debug message with who you hit and what damage was inflicted.



HitZone Setup:
Valid Percent Range: 0 - 9999

CVAR TR CT FF SELF
  • amx_hzm_generic "100 100 100 100"
  • amx_hzm_head "100 100 100 100"
  • amx_hzm_chest "100 100 100 100"
  • amx_hzm_stomach "100 100 100 100"
  • amx_hzm_leftarm "100 100 100 100"
  • amx_hzm_rightarm "100 100 100 100"
  • amx_hzm_leftleg "100 100 100 100"
  • amx_hzm_rightleg "100 100 100 100"

For Enabling/Disabling HitZones:
  • amx_hz_flags "abcdefgh"
  • a = Generic
  • b = Head
  • c = Chest
  • d = Stomach
  • e = Left Arm
  • f = Right Arm
  • g = Left Leg
  • h = Right Leg
For Showing Debug Message When Setting Up Cvars:
  • amx_hz_debug "0"
  • 0 = Off
  • 1 = On
  • amx_hz_debug_mode "0"
  • 0 = Client Print Message
  • 1 = HUD Print Message
For FriendlyFire HitZones Enabled/Disabled:
  • amx_hz_ff "0"
  • 0 = Off
  • 1 = On

This Plugin Has Been Coded For AMXX 1.8.3, BUT Also Supports Older Versions With The Included COLORCHAT.INC File Below For Local Compiling.
You no longer need to compile locally for colorchat as it was removed.

You will need to put the hzm.cfg file in the configs folder.


  • Blizzard_87 - Original Idea/Coder
  • Backstabnoob - Idea For Optimizing HitZone Cvars
ChangeLog

ThreadEnd
.
Attached Files
File Type: sma Get Plugin or Get Source (hzm.sma - 1701 views - 7.1 KB)
File Type: cfg hzm.cfg (943 Bytes, 530 views)
__________________

Last edited by Blizzard_87; 04-25-2015 at 12:54.
Blizzard_87 is offline
Old 06-07-2014, 02:12
Blizzard_87
This message has been deleted by Blizzard_87.
Kia
AlliedModders Donor
Join Date: Apr 2010
Location: In a world of madness
Old 06-07-2014 , 02:56   Re: HitZones Manager ( 07/06/2014 )
Reply With Quote #2

Nice plugin, good job!
__________________
Kia is offline
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 06-07-2014 , 07:10   Re: HitZones Manager ( 07/06/2014 )
Reply With Quote #3

Good plugin, beatiful thread "decor".
But, what about shield hitzone ?
Phant is offline
Send a message via ICQ to Phant
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 06-07-2014 , 09:37   Re: HitZones Manager ( 07/06/2014 )
Reply With Quote #4

Quote:
Originally Posted by Kia View Post
Nice plugin, good job!
Thanks.

Quote:
Originally Posted by Phant View Post
Good plugin, beatiful thread "decor".
But, what about shield hitzone ?
Shield HitZone? why you want to add damage to a shield?

EDIT:

Forgot to add flags and debug cvars to main post... updated first post.
__________________

Last edited by Blizzard_87; 06-07-2014 at 18:36.
Blizzard_87 is offline
Phant
Veteran Member
Join Date: Sep 2009
Location: New Jersey
Old 06-07-2014 , 18:38   Re: HitZones Manager ( 07/06/2014 )
Reply With Quote #5

Quote:
Originally Posted by Blizzard_87 View Post
Shield HitZone? why you want to add damage to a shield?
Not damage to shield. Possibility for "wallbanging" shield (with custom % of damage). But I think it's hard to do.
Never mind, just a thought.
Phant is offline
Send a message via ICQ to Phant
EthicalHacker007
Veteran Member
Join Date: May 2014
Old 06-08-2014 , 01:16   Re: HitZones Manager ( 07/06/2014 )
Reply With Quote #6

Nice idea. Will test it and report here.

Edit: Works as stated. But this plugin doesn't detects damage given to own and doesn't detects tk. I naded myself with damage multiplier x 1000 but still it damaged me with 64 damage. Also when I hit my teammates, the damage given is normal. I think you should add a cvar for ffa or tk. And maybe a cfg or ini file with all cvars, too lazy to copy cvars to amxx.cfg. Hehe. Good Job.

Offtopic: Who designed the logo?
__________________

Last edited by EthicalHacker007; 06-08-2014 at 04:37.
EthicalHacker007 is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 06-08-2014 , 10:51   Re: HitZones Manager ( 07/06/2014 )
Reply With Quote #7

Quote:
Originally Posted by EthicalHacker007 View Post
Nice idea. Will test it and report here.

Edit: Works as stated. But this plugin doesn't detects damage given to own and doesn't detects tk. I naded myself with damage multiplier x 1000 but still it damaged me with 64 damage. Also when I hit my teammates, the damage given is normal. I think you should add a cvar for ffa or tk. And maybe a cfg or ini file with all cvars, too lazy to copy cvars to amxx.cfg. Hehe. Good Job.

Offtopic: Who designed the logo?
I might add config file with next update.

Offtopic. I made the logo with gimp.
__________________
Blizzard_87 is offline
EthicalHacker007
Veteran Member
Join Date: May 2014
Old 06-08-2014 , 10:52   Re: HitZones Manager ( 07/06/2014 )
Reply With Quote #8

Quote:
Originally Posted by Blizzard_87 View Post
I might add config file with next update.

Offtopic. I made the logo with gimp.
What about ffa?
__________________
EthicalHacker007 is offline
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 06-08-2014 , 10:54   Re: HitZones Manager ( 07/06/2014 )
Reply With Quote #9

Quote:
Originally Posted by EthicalHacker007 View Post
What about ffa?
I'll look into it.
__________________
Blizzard_87 is offline
Backstabnoob
Veteran Member
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 06-08-2014 , 19:15   Re: HitZones Manager ( 07/06/2014 )
Reply With Quote #10

PHP Code:
new Float:flDamage;
            
if( 
get_user_teamindex ) == 
{
    
flDamage = ( Dmg g_iCvarsTR ][ iHitGroup ] / 100 );
}
else if( 
get_user_teamindex ) == )
{
    
flDamage = ( Dmg g_iCvarsCT ][ iHitGroup ] / 100 );
}                        
SetHamParamFloat4flDamage  ); 
=>
PHP Code:
SetHamParamFloat4Dmg g_iCvarsget_user_teamindex ) == TR CT ][ iHitGroup ] / 100 ); 



PHP Code:
m_szCvarValue32 
This doesn't really need to have 32 cells. Long int can have up to 10 digits, so 10 is more than enough. In fact, I'd just put it at 4 and call it a day.


PHP Code:
ExecuteHamHam_IsPlayeriAttacker ) && get_user_teamindex ) != get_user_teamiAttacker 
No point in this. To make sure the attacker is a player, just check if their index is between 0 and maxplayers. For the teams, some servers might have teamfire enabled for various reasons where this could be useful as well (deathmatch servers with FFA or servers that don't take teams into account in general), so you should probably make a cvar for it.

You don't need to cache the cvars, but I'll leave that up to you as it doesn't matter at all here.

Also, enforcing colorchat just because of a debug message seems kinda weird to me. I'd suggest adding another flag cvar that dictates which hits should be displayed and a cvar between normal chat/colorchat/HUD.

Other than that your code seems fine, change these things and I'll approve it.
__________________
Currently busy working on a very large scale anime database project.

Last edited by Backstabnoob; 06-08-2014 at 20:20.
Backstabnoob 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 01:05.


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