function fxDTSBrick::OnPlant( %this, %obj )
{
echo("attempting to plant");
%client = %obj.getGroup().client;
// %db = %obj.getDataBlock();
if( isObject( %obj ) )
{
echo("brick exists!");
%req = %this.brickSizeX * %this.brickSizeY * %this.brickSizeZ;
if( %client.Plastic < %req )
{
echo("Not enough plastic!");
commandToClient( %client, 'centerPrint', "\c6You need\c3" SPC %req SPC "\c6plastic to plant this brick.", 2 );
return;
}
else
{
echo("Enough plastic!");
commandToClient( %client, 'centerPrint', "\c6You planted a brick for\c3" SPC %req SPC "\c6plastic.", 2 );
%client.Plastic -= %req;
parent::onPlant( %this, %obj );
}
}
}
This won't work.
At all.
Not even echo is called.
Yes, this is packaged.
I have no idea why this does not work, seeing as in CityRPG, this bitch works just fine.
Honestly, I need to get this function work on plant, at least, even if there are errors.