PHP Code:
function onPlayerTouchsMe()
{
if ( clientr.chestsOpened.index( @ this.level.name ) == -1 )
{
clientr.chestsOpened.add( this.level.name );
// Stuff to do e.g. add a weapon
}
}
There's your chest script. Just need to use "clientr.chestsOpened.index( @ level ) == -1" to make sure they haven't been in it.