void main()
{
object oPC = GetLastPCRested();
int iAllow = GetLocalInt(oPC,"restallow");

if   ( iAllow != 1 ) // restallow not 1, not in "safezone" -> NO RESTING
    {
    AssignCommand(oPC, ClearAllActions());
    SendMessageToPC(oPC,"It is not safe to rest here.");
    }
}
