I have a problem about hook the TakeDamage virtual function using HAMSANDWICH, Here is my code:
Code:
plugin_init()
{
RegisterHam(Ham_TakeDamage,"player","ham_dodamage");
}
public ham_dodamage(victim, idinflictor, idattacker, Float:damage, damagebits)
{
server_print("victim %d id %d idatt %d damage %f damagebits %d",victim,idinflictor,idattacker, damage, damagebits);
}
the problem is that when I hit a bot, nothing happend, on other word the server did not print the trace message ("victim....").. but when the bot hit me, it generates the trace message. How can i let it take effect to bots? Thanks in advance.