I took what was read above into consideration. Thank you. But I am running all pvp actions via Clientside.
With that said, I am having issues and can't find out why this won't work.
This is the script for the weapon "Combat"
PHP Code:
//#CLIENTSIDE
function onKeyPressed(code, key){
if (key == "s"){
setAni("sword", NULL)'
if (player.x in |this.x-2, this.x + 1| && player.y in |this.y-1, this.y + 3|) {
triggerAction(player.x, player.y, "SYSTEM/damage", "Hurt");
}
}
}
And this is the weapon for my damage system:
PHP Code:
//#CLIENTSIDE
function onHurt(){
setAni("hurt", NULL);
player.chat = "HURT!";
}
It's not triggering the function.
I know the x1,x2 and y1,y2 and a little outa wack. I'm just testing with the player.dir == 3