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

Ham_TakeDamage question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JusTGo
Veteran Member
Join Date: Mar 2013
Old 02-03-2016 , 12:32   Ham_TakeDamage question
Reply With Quote #1

does both codes do the same thing if not whats different between them:
#1
PHP Code:
#include <hamsandwich>
#include <amxmodx>

public plugin_init()
{
    
RegisterHam(Ham_TakeDamage"player""TakeDamage_Pre");
}

public 
TakeDamage_Pre(iVictimiInflictoriAttackerFloat:fDamageiBitDamage)
{
    
HAM_SUPERCEDE

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

public plugin_init()
{
    
RegisterHam(Ham_TakeDamage"player""TakeDamage_Pre");
}

public 
TakeDamage_Pre(iVictimiInflictoriAttackerFloat:fDamageiBitDamage)
{
    
SetHamParamFloat(40.0);

__________________

Last edited by JusTGo; 02-03-2016 at 12:37.
JusTGo is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 02-03-2016 , 13:11   Re: Ham_TakeDamage question
Reply With Quote #2

Supercede blocks the damage completely, and in the second code you change the damage to 0...
safetymoose is offline
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 02-04-2016 , 08:05   Re: Ham_TakeDamage question
Reply With Quote #3

supercede will completely block the damage event(no blood will come out, victim won't be knockbacked, etc), while setting the damage to 0 will just not substract hp from the victim.
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
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 07:06.


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