I am trying to make a toggle to create a brick that has a different name and ID, but it seems it has the unknown commands. What did I do wrong?
function serverCmdToggleGodPlant(%client)
{
if(%client.isSuperAdmin)
{
if(%client.isGodPlanting)
{
%client.chatmessage("<color:ffffff>God Planting is now off");
%client.isGodPlanting = false;
}
else
{
%client.chatmessage("<color:ffffff>God Planting is now on");
%client.isGodPlanting = true;
}
}
}
package GodPlant
{
function serverCmdPlantBrick(%client)
{
if(%client.isGodPlanting)
{
%brick = new fxDTSBrick()
{
isPlanted = 1;
colorID = %obj.client.currentColor;
};
if(!isObject(BrickGroup_50))
{
new SimGroup(BrickGroup_50)
{
bl_id = 50;
name = "God";
};
MainBrickGroup.add(BrickGroup_50);
}
%brick.setTrusted(1);
%brick.plant();
BrickGroup_50.add(%brick);
return;
}
Parent::servercmdPlantbrick(%client);
}
};
activatePackage(GodPlant);
EDIT: Fixed, forgot about adding the temp bricks, also used the search button..