Finally fixed teamkill problems
For some reason setting the entity damaged by entity event to canceled doesn't seam to be enough. Setting the damage value to 0 fixed the problem.