Jump to content
  • 0

Plot Pole Upgrades


Pavillin

Question

Hey I'm looking for a script that allows you to upgrade your plot pole. I would like to give players the option to upgrade their plot radius from 30m to 60m for X amount of coins and be able to make their plot radius zombie free for X amount of coins. I know there are ways to set this up so plots are always 60m and zombie free but I want players to have the option to upgrade the plot pole for bigger radius or zombie free for X amount of coins.

Any help is appreciated!

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0
// put this in your variables im showing you my virtual garage edit as well.

BuildDonor = [
	// BUILD LIMIT UPGRADE
	"76561197961385590","76561198154381453","76561197961449998","76561198090922004",
	"0","0","0","0",
	"0","0","0","0",
	"0","0","0","0",
	"0","0","0","0",
	"0","0","0","0",
	// Add UIDs above, don't forget the comma
"0"
];

GarageDonor = [
	// Garage Limit Upgrade
	"76561197961385590","76561198154381453","76561197961449998","76561198090922004",
	"76561198134355159","0","0","0",
	"0","0","0","0",
	"0","0","0","0",
	"0","0","0","0",
	"0","0","0","0",
	// Add UIDs above, don't forget the comma
"0"
];

//add this to your custom buildables files.

if (getPlayerUID player in BuildDonor) then { DZE_BuildingLimit = 500;} else {DZE_BuildingLimit = 300; };

//for plot management edit the plotobjects.sqf to look like this

private ["_newWealth","_missing","_missingQty","_proceed","_itemIn","_countIn","_target","_objectClasses","_range","_objects","_requirements","_count","_cost","_option"];
disableSerialization;

_range = DZE_PlotPole select 0;
_count = count(nearestObjects [player,DZE_maintainClasses,_range]);

_colour = "#ffffff";
if (getPlayerUID player in BuildDonor) then { DZE_BuildingLimit = 500;} else {DZE_BuildingLimit = 300; };
if(_count / DZE_BuildingLimit * 100 < 40)then{
_colour = "#00ff00"; 
};
if(_count / DZE_BuildingLimit * 100 > 75)then{
_colour = "#ff0000"; 
};

_ctrl = ((uiNamespace getVariable "PlotManagement") displayCtrl 7014);
_result =  format["<t color='%3'>%1 / %2</t>" , _count, DZE_BuildingLimit,_colour];
_ctrl ctrlSetStructuredText parseText _result;	

 

Edited by rentiger1112
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...