PHP Code:
setAlive(state)
{
    
entity self;
    if (
state)
        
closer(7entity getEntityNumber(), 1);
    else
        
closer(7entity getEntityNumber(), 0);
}

player setModel("");
tank linkTo(player);
tank setAlive(1); 
Now the tank should call CodeCallback_PlayerDamage. Needs libcod: https://github.com/kungfooman/libcod