ACE3/addons/bft/functions/fnc_getOwnedDevices.sqf
2018-10-04 16:43:06 +02:00

28 lines
378 B
Plaintext

#include "script_component.hpp"
/*
* Author: Glowbal
*
*
* Arguments:
* 0: owner <OBJECT>
*
* Return Value:
* device IDs <ARRAY>
*
* Public: No
*/
params ["_owner"];
// Or use OBJECT getvariable [QGVAR(ownedDevices), []]; ?
private _ids = [];
{
if ((_x select 5) == _owner) then {
_ids pushback (_x select 0);
};
} forEach GVAR(deviceData);
_ids