View Single Post
  #10  
Old 06-03-2010, 03:24 AM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
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.plfindNearestPlayers(hitx,hity)){
    
temp.playercenter = {temp.pl.1.5temp.pl.2};
      if (
hitx in |temp.playercenter[0]-1.5temp.playercenter[0]+1.5|){
       if (
hity in |temp.playercenter[1]-1.5temp.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.
Reply With Quote