Ok, here's the problem:
I have this code:
PHP Code:
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
RegisterHam(Ham_TakeDamage, "player", "eventTakeDamage");
RegisterHam(Ham_Spawn, "player", "eventSpawn");
}
public eventSpawn(id)
{
dmgPlayer = 0;
return PLUGIN_CONTINUE;
}
public eventTakeDamage(id, weapon, attacker, Float:damage, damagebits)
{
dmgPlayer += damage;
get_user_name(id, VictimName, 29);
if(attacker != 0 && attacker != id)
{
client_print(attacker, print_chat, "You have done %i damage to %s!", dmgPlayer, VictimName);
}
return PLUGIN_HANDLED;
}
And now the problem is that eventTakeDamage function prints me "You have done 1026698563 damage to r0cc0".
I'm sure you noticed that it's quite impossible for me to have made r0cc0 that much damage, but that is what the message returned.
I have other mistakes with the code too, but nothing I can't handle so this is the main problem.
Hope you help.