Raised This Month: $ Target: $400
 0% 

Ham_TakeDamage hitplace check.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
P1raten
Senior Member
Join Date: Feb 2010
Old 02-08-2013 , 19:18   Re: Ham_TakeDamage hitplace check.
Reply With Quote #1

Quote:
Originally Posted by Arkshine View Post
fakemeta_util, that's something you can actually avoid, because it's a bunch of stocks converted from engine/fun module to fakemeta, and it uses more natives most of times for one thing. As result, slower code. It's not a module, but just wanted to give an example of what you should not do/use.
That must've been what I read then.
__________________
No salvation. Only madness.
P1raten is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-09-2013 , 14:04   Re: Ham_TakeDamage hitplace check.
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

const m_LastHitGroup 75

public plugin_init()
{
    
RegisterHam(Ham_TakeDamage"player""OnCBasePlayer_TakeDamage"false)
}

public 
OnCBasePlayer_TakeDamageidiInflictoriAttackerFloat:flDamagebitsDamageType // return int
{
    new 
iHitgroup get_pdata_int(idm_LastHitGroup)

This is as simple as this.

Anyway, if you don't want to modify damage, you can use csx.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
P1raten
Senior Member
Join Date: Feb 2010
Old 02-09-2013 , 17:24   Re: Ham_TakeDamage hitplace check.
Reply With Quote #3

Quote:
Originally Posted by ConnorMcLeod View Post
PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

const m_LastHitGroup 75

public plugin_init()
{
    
RegisterHam(Ham_TakeDamage"player""OnCBasePlayer_TakeDamage"false)
}

public 
OnCBasePlayer_TakeDamageidiInflictoriAttackerFloat:flDamagebitsDamageType // return int
{
    new 
iHitgroup get_pdata_int(idm_LastHitGroup)

This is as simple as this.

Anyway, if you don't want to modify damage, you can use csx.
Thanks for the reply. My solution has already been applied and it is pretty much identical to yours.

Anyway, thanks.
__________________
No salvation. Only madness.
P1raten 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 11:11.


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