DLib/functions/Util/fn_getSyncClass.sqf
2020-01-15 19:18:38 +01:00

34 lines
473 B
Plaintext

/*
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;