Author Topic: I need an addon.  (Read 996 times)

When you host a minigame, Bricks have to be paid by score, Example a brick for $1 that means 1 score. Any addon?

And a custom brick inventory.

This aint a post for the help section. Consider the suggestions and request forum.

This aint a post for the help section. Consider the suggestions and request forum.

why bump the topic without any new or helpful information?
pretty sure all you're doing at this point is stuffposting

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:

Code: [Select]
$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.

Oh and name the folder Server_BricksCostPoints

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:

Code: [Select]
$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.

omg thx