diff options
| author | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:58:31 +0300 |
|---|---|---|
| committer | hybrid <hybrid@hybridlabs.pro> | 2026-06-11 19:58:31 +0300 |
| commit | e670b4ed55c459a21090bd0178ceaaaf12d87989 (patch) | |
| tree | b6833d5e842475f0ee27f5f617096445fdd4e4a1 /Client/Init/Init_BaseStructure.sqf | |
| download | a2wf_fallujah-e670b4ed55c459a21090bd0178ceaaaf12d87989.tar.gz a2wf_fallujah-e670b4ed55c459a21090bd0178ceaaaf12d87989.tar.bz2 a2wf_fallujah-e670b4ed55c459a21090bd0178ceaaaf12d87989.zip | |
init
Diffstat (limited to 'Client/Init/Init_BaseStructure.sqf')
| -rw-r--r-- | Client/Init/Init_BaseStructure.sqf | 34 |
1 files changed, 34 insertions, 0 deletions
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 |
