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.