4
« on: September 16, 2007, 07:03:24 PM »
Can Some One Tell Me Why This Doesnt Protect You When Your In It My Goals To Make A Safe Zone For Retail Like The One In RtB Heres The Code
////////TRAP BRICK: Safe\\\\\\\\
datablock ItemData(TrapSafeItem)
{
category = "Item";Â // Mission editor category
equipment = true;
//its already a member of item namespace so dont break it
//className = "Item"; // For inventory system
// Basic Item Properties
shapeFile = "./shapes/blank.dts";
mass = 1;
density = 0.2;
elasticity = 0.2;
friction = 0.6;
emap = true;
//gui stuff
uiName = "Trap Brick: Safe";
iconName = "";
doColorShift = true;
colorShiftColor = "0.000 0.200 0.640 1.000";
// Dynamic properties defined by the scripts
image = "";
canDrop = false;
};
function SafeTrigger::onEnterTrigger(%this,%trigger,%obj)
{
if($Pref::Server::Weapons == 1)
{
%obj.client.safe = 1;
messageClient(%obj.client,"","\c5You are now in the safe zone");
}
}
function SafeTrigger::onLeaveTrigger(%this,%trigger,%obj)
{
if($Pref::Server::Weapons == 1)
{
%obj.client.safe = 0;
messageClient(%obj.client,"","\c5You are now in the warzone");
}
}