View Single Post
  #2  
Old 01-11-2014, 08:22 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
It's just triggerserver. also since you're looping go through and add the players to an array and send that to the serverside instead of 1 or more triggers.

In theory all you should need is:

PHP Code:
for (temp.pltemp.closePlayers) {
  if (
pl == player || pl.guild == player.guild || pl.isdead || pl.ispause) continue; 
  if ((
pl.1.5in |myx1myx2| && (pl.2in |myy1myy2|) { 
    
temp.hurt.add(temp.pl.account);
  }
}
if (
temp.hurt.size() > 0) {
  
triggerserver("gui"this.name"hurtplayers"temp.hurt);

then on the server-side:

PHP Code:
temp.hurtplayers params[1];
for (
temp.pltemp.hurtplayers) {
  
temp.pl findplayer(temp.pl);
  if (
temp.pl == NULL || !(temp.pl in players)) continue;
  if (
pl == player || pl.guild == player.guild || pl.isdead || pl.ispause) continue;
  
temp.dist vectordist({temp.pl.xtemp.pl.y0},{player.xplayer.y0});
  if (
temp.dist 5) {
    
temp.pl.hp--;
    
temp.pl.setani("hurt""");
    
temp.pl.triggerclient("gui""-System/Damage""washurt");
  }

__________________
Quote:
Reply With Quote