View Single Post
  #1  
Old 06-11-2012, 10:08 PM
Fysez Fysez is offline
Banned
Join Date: Apr 2012
Posts: 89
Fysez has a little shameless behaviour in the past
Question Bow not working?

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 (plfindNearestPlayers() {
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.dirplayer.account);
  
temp.angl getangle(vecx(player.dir), vecy(player.dir));
  
shoot(player.0.5 vecx(player.dir), player.vecy(player.dir), player.ztemp.angl00"classic_arrow"player.dir);
}  

function 
onActionProjectile(ptypeatypepdirpacc) {
  if (
ptype != "classic" && atype != "arrow") return;
  if (
findplayer(pacc).guild == player.guild && player.guild) return;
  
hitplayer(01player.1.5 vecx(pdir), player.vecy(pdir));

I just need it to hurt the player is all x.x
Reply With Quote