From c055d44dcdb87e8db49fb23e632fc086aa44cce6 Mon Sep 17 00:00:00 2001 From: hybrid Date: Thu, 11 Jun 2026 19:53:22 +0300 Subject: init --- Client/Functions/Client_InitTownsAndCamps.sqf | 40 +++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Client/Functions/Client_InitTownsAndCamps.sqf (limited to 'Client/Functions/Client_InitTownsAndCamps.sqf') diff --git a/Client/Functions/Client_InitTownsAndCamps.sqf b/Client/Functions/Client_InitTownsAndCamps.sqf new file mode 100644 index 0000000..cdddcbc --- /dev/null +++ b/Client/Functions/Client_InitTownsAndCamps.sqf @@ -0,0 +1,40 @@ +Private ["_camp","_campSideID","_camps","_count","_count1","_marker","_town","_townSideID"]; + +for [{_count = totalTowns - 1},{_count >= 0},{_count = _count - 1}] do { + _town = towns select _count; + _townSideID = _town getVariable "sideID"; + + if (sideID == _townSideID) then { + _marker = Format["%1Depot",str _town]; + _marker setMarkerColorLocal ("Friendly" Call GetMarkerColoration); + }; + + while {true} do { + sleep .005; + _camps = _town getVariable "camps"; + if !(isNil "_camps") exitWith {}; + }; + _camps = _town getVariable "camps"; + + for [{_count1 = count _camps - 1},{_count1 >= 0},{_count1 = _count1 - 1}] do { + _camp = _camps select _count1; + if !(isNull _camp) then { + _marker = Format["%1Camp%2",str _town,_camps find _camp]; + + while {true} do { + sleep .005; + _campSideID = _camp getVariable "sideID"; + if !(isNil "_campSideID") exitWith {}; + }; + _campSideID = _camp getVariable "sideID"; + + if (sideID == _campSideID) then { + _marker setMarkerColorLocal ("Friendly" Call GetMarkerColoration); + } else{ + if (_townSideID == sideID) then { + _marker setMarkerColorLocal ("Enemy" Call GetMarkerColoration); + }; + }; + }; + }; +}; \ No newline at end of file -- cgit v1.3.1