I don't know what exactly you're trying to do but I think this might be it
PHP Code:
function onActionServerside(hitx,hity){
for (temp.pl: findNearestPlayers(hitx,hity)){
temp.playercenter = {temp.pl.x + 1.5, temp.pl.y + 2};
if (hitx in |temp.playercenter[0]-1.5, temp.playercenter[0]+1.5|){
if (hity in |temp.playercenter[1]-1.5, temp.playercenter[1]+1.5){
//do damage
}
}
}
}
Also, I'm assuming if he is doing something that would cause damage that the player would be either in the 8 surrounding levels so findNearestPlayers would be best in my opinion rather than findplayer as everyone else was saying. If I'm wrong then correct me but that's what I have always just assumed.