comment {Part of the Multiple 'OnMapSingleClick' Command Handler v1.1 By General Barron};
comment {Run via 'onmapsingleclick' command. Executes all commands added to handler (if they are still active)};


_i = 0;
while {_i < count GENB_mapclicks} do
{
	_c = GENB_mapclicks select _i;
	_code = _c select 0;
	_count = _c select 1;
	_cond = _c select 2;
	_data = _c select 3;

	if (_count > 0) then
	{
		_clicks = _count - 1;
		_data call _code;
		if(_data call _cond) then {_c set [1, _clicks];};
		if(_clicks == 0) then {3 call (_c select 4);};
	};
	_i = _i + 1;
};
