Raised This Month: $ Target: $400
 0% 

[Help] Damage Event


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-20-2014 , 13:35   Re: [Help] Damage Event
Reply With Quote #1

What are your intentions with this?
PHP Code:
if( !is_user_connectedattacker ) || inflictor != attacker )
        return 
HAM_IGNORED
__________________

Last edited by Bugsy; 12-20-2014 at 13:35.
Bugsy is offline
BhK
Junior Member
Join Date: Dec 2014
Location: India
Old 12-20-2014 , 13:52   Re: [Help] Damage Event
Reply With Quote #2

Quote:
Originally Posted by Bugsy View Post
What are your intentions with this?
PHP Code:
if( !is_user_connectedattacker ) || inflictor != attacker )
        return 
HAM_IGNORED
Checking if attacker is connected and the damage is done by the attacker !
is something wrong ?
Or should I only write ?
PHP Code:
if( inflictor != attacker )
        return 
HAM_IGNORED
BhK is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-20-2014 , 14:13   Re: [Help] Damage Event
Reply With Quote #3

Quote:
Originally Posted by BhK View Post
Checking if attacker is connected and the damage is done by the attacker !
is something wrong ?
Or should I only write ?
PHP Code:
if( inflictor != attacker )
        return 
HAM_IGNORED
Why are you using inflictor? inflictor is the same as attacker except for when it's grenade damage. I'm guessing you want to check that the victim was hurt by another player? Better to compare victim to attacker.
PHP Code:
if ( !is_user_connectedattacker ) || ( victim == attacker ) )
        return 
HAM_IGNORED
__________________

Last edited by Bugsy; 12-20-2014 at 14:17.
Bugsy is offline
BhK
Junior Member
Join Date: Dec 2014
Location: India
Old 12-20-2014 , 20:53   Re: [Help] Damage Event
Reply With Quote #4

Quote:
Originally Posted by Bugsy View Post
Why are you using inflictor? inflictor is the same as attacker except for when it's grenade damage. I'm guessing you want to check that the victim was hurt by another player? Better to compare victim to attacker.
PHP Code:
if ( !is_user_connectedattacker ) || ( victim == attacker ) )
        return 
HAM_IGNORED
Thanks !
BhK 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 15:23.


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