package drugDupeCheck
{
function fxDTSBrick::onPlant(%brick)
{
%brick = %client.player.tempBrick;
if(%brick.duplicationBrick)
{
echo("OP 1"); // Debug
if(%brick.getDatablock().isDrug)
{
echo("Is a drug."); // Debug
messageClient(%brick.client, '', "\c0Dont ever try to duplicate your drugs - thats cheating.");
messageAll('', '\c3' @ %brick.client.name @ "\c6attempted to cheat by duplicating drugs!");
%brick.schedule(0,delete);
}
}
else if(%brick.dupStartBrick)
{
echo("OP 2"); // Debug
if(%brick.getDatablock().isDrug)
{
echo("Is a drug."); // Debug
messageClient(%brick.client, '', "\c0Dont ever try to duplicate your drugs - thats cheating.");
messageAll('', '\c3' @ %brick.client.name @ "\c6attempted to cheat by duplicating drugs!");
%brick.schedule(0,delete);
}
}
else
{
echo("OP 3");
parent::onPlant(%client);
//Was not duplicated.
}
}
};
activatePackage(drugDupeCheck);
Only OP 3 is reflected in code for the ones that were planted. The one that was blocked appears to have been detected by the code, but OP 1 nor OP 2 shows up in the console code.