mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
22 lines
476 B
Plaintext
22 lines
476 B
Plaintext
/*
|
|
* Author: commy2
|
|
*
|
|
* Returns the unit that has the given backpack object equipped.
|
|
*
|
|
* Argument:
|
|
* 0: Executing Unit (Object)
|
|
* 1: A backpack object (Object)
|
|
*
|
|
* Return value:
|
|
* Unit that has the backpack equipped. (Object)
|
|
*/
|
|
#include "script_component.hpp"
|
|
scopeName "main";
|
|
|
|
params ["_unit","_backpack"];
|
|
_target = objNull;
|
|
{
|
|
if (backpackContainer _x == _backpack) then {_target = _x; breakTo "main"};
|
|
} forEach nearestObjects [_unit, ["Man"],2];
|
|
_target
|