I have found the bow script and I was going to edit it to shoot different objects, by only changing the Gani's.
However, It doesn't hurt the player it shoots?
I tried adding in:
PHP Code:
for (pl: findNearestPlayers() {
hurt(1);
}
but that doesn't seem to help, either.
Here's the bow script:
PHP Code:
//#CLIENTSIDE
function onWeaponfired() {
if (player.darts <= 0) return;
player.darts--;
freezeplayer(.1);
setani("shoot", "wbow1.png");
setshootparams("classic", "arrow", player.dir, player.account);
temp.angl = getangle(vecx(player.dir), vecy(player.dir));
shoot(player.x + 0.5 + vecx(player.dir), player.y + vecy(player.dir), player.z, temp.angl, 0, 0, "classic_arrow", player.dir);
}
function onActionProjectile(ptype, atype, pdir, pacc) {
if (ptype != "classic" && atype != "arrow") return;
if (findplayer(pacc).guild == player.guild && player.guild) return;
hitplayer(0, 1, player.x + 1.5 - vecx(pdir), player.y + 2 - vecy(pdir));
}
I just need it to hurt the player is all x.x