I talked to you online about your problem. You already have shoot() down it looks like, so here is what you need to do.
To make shoot() hurt other players, the player your shooting at
has to have onActionProjectile() in a
weapon.
Basic idea using this would be:
PHP Code:
function onActionProjectile()
{
if (player.ani != "hurt") // the player.ani is not hurt
{
player.hearts -= 0.5; // take .5 hearts
setani("hurt",null); // sets the ani to hurt
}
}
Hope this helps!