View Single Post
  #15  
Old 11-25-2007, 12:35 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Looks like this got pretty off track, but I'll share the one I made for Utopia.


Script class_findname:
PHP Code:
public function findName( i )
{
  
this.look = { "account", "communityname", "nick", "id" };
  
  for ( 
temp.a : allplayers )
  {
    for ( 
temp.n : this.look )
    {
      if ( 
makevar( "temp.a." @ temp.n ) == i )
      {
        return 
temp.a.account;
      }
    }
  }
  
  for ( 
temp.a : allplayers )
  {
    for ( 
temp.n : this.look )
    {
      if ( 
makevar( "temp.a." @ temp.n ).starts( i ) )
      {
        return 
temp.a.account;
      }
    }
  }
  
  return 
"Error!";
} 
__________________
Reply With Quote