blob: 10619dcd54bc5d2b3daa7c7dc03cd295c14d117e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
Private["_camps","_side","_sideID","_total","_town"];
_town = _this select 0;
_side = _this select 1;
_sideID = _side Call GetSideID;
_camps = _town getVariable "camps";
if (isNil '_camps') exitWith {1};
if (count _camps == 0) exitWith {1};
_total = 0;
{if ((_x getVariable "sideID") == _sideID) then {_total = _total + 1}} forEach _camps;
_total
|