Thread: headexists();
View Single Post
  #2  
Old 06-08-2008, 02:28 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
headexists(str) - returns boolean

from the Wiki.

You'd have to make your own system to detect hats.

I recommend something like this:

PHP Code:
function hatExistshat )
{
  
temp.hats.loadFolder"levels/images/hats/*"false );
  return 
hats.index( @ hat ) != -1;

That should work, though I haven't tested it.

The NPC-server will need read rights to the hats folder.
__________________
Reply With Quote