Raised This Month: $ Target: $400
 0% 

Ham_TakeDamage


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Mauricio Frb
Member
Join Date: Jul 2013
Old 07-21-2013 , 09:52   Ham_TakeDamage
Reply With Quote #1

I have a simple question,

Why this code works
Code:
public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	RegisterHam(Ham_TakeDamage, "player", "ham_playertakedamage", 0);
}


public ham_playertakedamage(idvictim, idinflictor, idattacker, Float:damage, damagebits)
{
	SetHamReturnInteger(0);
	return HAM_SUPERCEDE;
}
and that's not
Code:
new HamHook:HamForward;

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	HamForward = RegisterHam(Ham_TakeDamage, "player", "ham_playertakedamage", 0);
	
	// End round event
	register_logevent("logevent_endround", 2, "1=Round_End");
}

public logevent_endround()
{
	EnableHamForward(HamForward);
}

public ham_playertakedamage(idvictim, idinflictor, idattacker, Float:damage, damagebits)
{
	SetHamReturnInteger(0);
	return HAM_SUPERCEDE;
}
I don't get the bug.
Mauricio Frb is offline
 



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 06:25.


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