mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
19 lines
696 B
Plaintext
19 lines
696 B
Plaintext
private ["_range","_count","_colour","_ctrl","_target"];
|
|
disableSerialization;
|
|
|
|
_range = DZE_PlotPole select 0;
|
|
_target = (([player] call FNC_getPos) nearEntities ["Plastic_Pole_EP1_DZ",15]) select 0;
|
|
// Also count safes, lockboxes, vanilla buildables, tents and stashes against DZE_BuildingLimit
|
|
_count = count (nearestObjects [_target,DZE_maintainClasses,_range]);
|
|
|
|
_colour = "#ffffff";
|
|
|
|
if (_count / DZE_BuildingLimit * 100 < 40) then {
|
|
_colour = "#00ff00";
|
|
};
|
|
if (_count / DZE_BuildingLimit * 100 > 75) then {
|
|
_colour = "#ff0000";
|
|
};
|
|
|
|
_ctrl = findDisplay 711194 displayCtrl 7014;
|
|
_ctrl ctrlSetStructuredText parseText format["<t color='%3'>%1 / %2</t>" , _count, DZE_BuildingLimit,_colour]; |