datablock TriggerData(SafeZone)
{
tickPeriodMS = 100;
};
function SafeZone::onLeaveTrigger(%this,%trigger,%obj)
{
messageclient(%obj.client,'',"\c1Entered the \c2Safe Zone");
%obj.client.isSafe = 1;
}
function SafeZone::onEnterTrigger(%this,%trigger,%obj)
{
messageclient(%obj.client,'',"\c1Left the \c2Safe Zone");
%obj.client.isSafe = 0;
}
function SafeZone::onTickTrigger(%this,%trigger, %obj)
{
Parent::onTickTrigger(%this,%trigger);
}
package SafeZoneToggle {
function serverCmdSelf Delete(%client)
{
if(%client.isSafe)
{
messageclient("\c1Self Delete is disabled in the \c2Safe Zone.");
}
else {
parent::serverCmdSelf Delete(%client);
}
}
};activatepackage(SafeZoneToggle);
--
Try that and tell me what messages you get. Are you placing the correct trigger and scaling it up to a large size so you can walk in?