serverCmdPlantBrick only has one variable, client. If you want to get info about the planted brick, I suggest doing something like this:
package BrickPlant {
function serverCmdPlantBrick(%this)
{
$CodeNextBrick=1;
parent::serverCmdPlantBrick(%this);
}
function fxDTSbrick::onPlant(%brick)
{
%ret = parent::onPlant(%brick);
%client = %brick.client;
if(!$codeNextBrick)
return %ret;
$CodeNextBrick=0;
if(%brick.getDownBrick(0).getDatablock().getName() $= "Admin32x32x1Data" && !%client.isAdmin)
{
%brick.delete();
messageClient(%client,'',"You must be an admin to build there!");
return;
}
return %ret;
}
};
I just kinda pasta'd your code onto the end there, so I'm assuming that works.
EDIT: I finally figured out what you were trying to do, and updated my code so that it would work.