Make a new folder. In it, make two text files. One name it "description.txt" and the other one name it "server.cs".
Now, on server.cs, copy and paste the following:
$joinScore=100;
$brickCost=1;
$setScoreOnEnter=1;
package payToPlantBricks {
function fxDTSbrick::onPlant(%this) {
Parent::onPlant(%this);
%client = %this.getGroup().client;
if(%client.score > %brickCost-1) {
%client.score = %client.score - %brickCost;
commandToClient(%client, 'bottomPrint', "\c2You have paid 1 score point to plant this brick.", 1);
} else {
commandToClient(%client, 'centerPrint', "You have no more score to plant a brick.", 3);
%this.schedule(0,"delete");
}
}
function GameConnection::autoAdminCheck(%client){
Parent::autoAdminCheck(%client);
if($setScoreOnEnter == 1) {
%client.setScore($joinScore);
}
}
};
activatePackage(payToPlantBricks);
Modify the number on the right of the = on $joinScore to change how many points each player has when joining.
Modify the number on the right of the = on $brickCost to change how many points each player has to spend when planting.
Set the number on the right of the = on $setScoreOnEnter to anything other than 1 to not set a score when a player joins the game.