This is the katana script:
PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
temp.dx = player.x + vecx(player.dir) * 1.5;
temp.dy = player.y + vecy(player.dir) * 2;
triggeraction(dx, dy, "AttackPlayer", player.account, .5);
}
Put this in a script that all players have:
PHP Code:
//#CLIENTSIDE
function onActionAttackPlayer(acc, damage) {
if (acc == player.account) {
return; // this ends the function
}
if (damage <= 0) {
return;
}
hurt(damage);
setAni("HURTGANI", null);
}
Let me know if you need anything explained.