From dee52083d359434fc3ac51a871c1b836d092d2ac Mon Sep 17 00:00:00 2001 From: hybrid Date: Thu, 11 Jun 2026 19:55:41 +0300 Subject: init --- Client/Init/Init_BaseStructure.sqf | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Client/Init/Init_BaseStructure.sqf (limited to 'Client/Init/Init_BaseStructure.sqf') diff --git a/Client/Init/Init_BaseStructure.sqf b/Client/Init/Init_BaseStructure.sqf new file mode 100644 index 0000000..a60bf50 --- /dev/null +++ b/Client/Init/Init_BaseStructure.sqf @@ -0,0 +1,34 @@ +waitUntil {commonInitComplete}; + +if (local player) then { + Private["_allies","_color","_hq","_marker","_structure","_text","_type","_side","_voteTime"]; + + _structure = _this Select 0; + _hq = _this select 1; + _side = _this select 2; + _allies = if (count _this > 3) then {_this select 3} else {""}; + + if (_side != side player) exitWith {}; + + sleep random(3); + + while {_voteTime = WF_Logic getVariable "eastCommanderVoteTime";IsNil "_voteTime"} do {sleep 1}; + + _marker = Format["BaseMarker%1",buildingMarker]; + buildingMarker = buildingMarker + 1; + createMarkerLocal [_marker,getPos _structure]; + _type = "mil_box"; + _color = "ColorBlue"; + if (_hq) then {_type = "Headquarters";_color = "ColorGreen"}; + if (_allies != "") then {_type = "mil_box";_color = "ColorGreen"}; + _marker setMarkerTypeLocal _type; + _text = ""; + if (!_hq && _allies == "") then {_text = [_structure] Call GetStructureMarkerLabel;_marker setMarkerSizeLocal [0.5,0.5]}; + if (_allies != "") then {_marker setMarkerSizeLocal [0.5,0.5];_text = _allies}; + if (_text != "") then {_marker setMarkerTextLocal _text}; + _marker setMarkerColorLocal _color; + + while {!isNull _structure && alive _structure} do {sleep 2}; + + deleteMarkerLocal _marker; +}; \ No newline at end of file -- cgit v1.3.1