View Single Post
  #2  
Old 02-19-2011, 02:52 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Ahhh- you're doing this on the serverside.

What you should do is trigger to the clientside and move the player clientside with a similar function- it will be lassy laggy on your server.

HTML Code:
function onActionServerSide(this.face, this.firex, this.firey){ 
  for (temp.pl: findnearestplayers(this.firex, this.firey)){ 
    if (temp.pl == player) continue;

    //Do your HP checks here [to kill the player]
    temp.pl.triggerclient("weaponname for the function", "moveplayer", {this.face, this.firex, this.firey});
  }
}
in the weapon you trigger:
HTML Code:
//#CLIENTSIDE
function onActionClientside(option) {
  if (temp.option == "moveplayer") this.onmovePlayer(params[1]);
}

function onMovePlayer(data) {
  temp.face = temp.data[0];
  temp.firex = temp.data[1];
  temp.firey = temp.data[2];
  //Do your movement stuff
}
__________________

Last edited by xAndrewx; 02-19-2011 at 09:16 PM..
Reply With Quote