I could have sworn I've done this before, but maybe I'm wrong. pl.triggerServer just throws the error
Quote:
|
Script: Function Player Indalecio_Azmaveth.triggerServer not found in function doPlayerSword in script of Weapon -System/Movement
|
I have to trigger the server to use findplayer with the params, then pl.triggerclient, then trigger back to the server with the player that got hurt so I can subtract the health server side. Isn't there a better way? I've already tried adding in a function to a class that's joined to the player and it was useless as well.
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|) {
pl.triggerServer("weapon", this.name, "hurtPlayer", pl, killer, killerg);
}
}