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.pl: temp.closePlayers) {
if (pl == player || pl.guild == player.guild || pl.isdead || pl.ispause) continue;
if ((pl.x + 1.5) in |myx1, myx2| && (pl.y + 2) in |myy1, myy2|) {
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.pl: temp.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.x, temp.pl.y, 0},{player.x, player.y, 0});
if (temp.dist < 5) {
temp.pl.hp--;
temp.pl.setani("hurt", "");
temp.pl.triggerclient("gui", "-System/Damage", "washurt");
}
}