[quote author=Plexious link=topic=198516.msg5426598#msg5426598 date=1340849745]
-snip-
activatePackage(FoodBricks);
My bad, I thought onPlant was an fxDtsBrick and fxDtsBrickData function just like onPlant.
[/quote]
datablock fxDTSBrickData (smallFoodBrick)
{
brickFile = "./smallfood.blb";
category = "Special";
subCategory = "DayZ";
uiName = "1 Food";
iconName = "";
};
package FoodBricks
{
function fxDTSBrick::onActivate(%brick, %obj, %client, %pos, %dir)
{
parent::onActivate(%brick, %obj, %client, %pos, %dir);
if(%brick.getDatablock() $= "smallFoodBrick")
{
%client.food++;
commandtoclient(%client,'centerPrint',"You found food.");
}
}
};
activatePackage(FoodBricks);
For some reason, it still does not work.