mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
22 lines
400 B
Plaintext
22 lines
400 B
Plaintext
|
/*
|
||
|
* Author: commy2
|
||
|
*
|
||
|
* Returns the unit that has the given backpack object equipped.
|
||
|
*
|
||
|
* Argument:
|
||
|
* 0: A backpack object (Object)
|
||
|
*
|
||
|
* Return value:
|
||
|
* Unit that has the backpack equipped. (Object)
|
||
|
*/
|
||
|
|
||
|
private ["_backpack", "_unit"];
|
||
|
|
||
|
_backpack = _this select 0;
|
||
|
|
||
|
_unit = objNull;
|
||
|
{
|
||
|
if (backpackContainer _x == _backpack) exitWith {_unit = _x};
|
||
|
} forEach (allUnits + allDeadMen);
|
||
|
_unit
|