ACE3/addons/bft/functions/fnc_getOwnedDevices.sqf
2016-09-03 09:35:37 +02:00

29 lines
388 B
Plaintext

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