summaryrefslogtreecommitdiffstats
path: root/Client/Functions/Client_UIAddItem.sqf
blob: b7e84f6b5647322b6422e970f7b313c314649e74 (plain)
1
2
3
4
5
6
7
8
9
10
11
Private ['_items','_limit','_mag','_size'];
_items = _this select 0;
_mag = _this select 1;
_size = 0;
_limit = 12;

{_size = _size + 1} forEach _items;

if (_size + 1 <= _limit) then {_items = _items + [_mag]};

_items