DLib/functions/Util/fn_getSyncClass.sqf

34 lines
473 B
Plaintext
Raw Normal View History

2020-01-15 18:18:38 +00:00
/*
Author: Djeeberjr
Description:
Get all object from synchronizedObjects with.
Parameter(s):
0: OBJECT - self
1: ARRAY or STRING - className or array of classnames
Return:
ARRAY - [obj1,...]
*/
params ["_self","_filter"];
if(typeName _filter == "STRING")then{
_filter = [_filter];
};
_returnValue = [];
{
_y = _x;
{
if(typeOf _y == _x)then{
_returnValue pushBack _y;
};
} forEach _filter;
} forEach synchronizedObjects _self;
_returnValue;