Raised This Month: $51 Target: $400
 12% 

Remove damage.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ezio_auditore
Senior Member
Join Date: May 2013
Old 05-10-2014 , 11:52   Remove damage.
Reply With Quote #1

I wanted to remove any damage dealt.
I tried this.

Code:
public ham_DetectDamage(vic, inf, atckr, Float:dam, dmgbits){ setHamParamFloat(4, 0.0) }
Not Working.
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 05-10-2014 , 12:01   Re: Remove damage.
Reply With Quote #2

HAM_SUPERCEDE will block the call thus removing all damage.

If you want to modify the damage you have to return HAM_HANDLED.
__________________

Last edited by Black Rose; 05-10-2014 at 12:04.
Black Rose is offline
ezio_auditore
Senior Member
Join Date: May 2013
Old 05-11-2014 , 01:56   Re: Remove damage.
Reply With Quote #3

then my code must be...
Code:
public ham_DetectDamage(vic, inf, atckr, Float:dam, dmgbits){ return HAM_SUPERCEDE }
__________________
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
Old 05-17-2014, 04:13
ezio_auditore
This message has been deleted by YamiKaitou. Reason: wait 14 days before you bump
naven
Veteran Member
Join Date: Jun 2008
Location: Poland, Cieszyn
Old 05-17-2014 , 04:58   Re: Remove damage.
Reply With Quote #4

Code:
RegisterHam(Ham_TakeDamage, "player","fwTakeDamage",0);
(...)
public fwTakeDamage(this, idinflictor, idattacker, Float:damage, damagebits){
	return HAM_SUPERCEDE;
}
http://amxx.pl/topic/14829-wplywanie-na-obrazenia/
__________________
naven.com.pl
"At the end of the day, there are always going to be mental disorders and people who cause violence for no other reason than the fact that they're fucked up and lost. And all we can do is try to learn from it." Corey Taylor.
naven 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:26.


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