ACE3/addons/rearm/functions/fnc_canPickUpAmmo.sqf

22 lines
407 B
Plaintext
Raw Normal View History

2015-08-15 16:43:13 +00:00
/*
* Author: GitHawk
* Check if a unit can pick up ammo
*
* Arguments:
* 0: The Player <OBJECT>
* 1: The Target <OBJECT>
*
* Return Value:
* Can rearm
*
* Example:
* [tank] call ace_rearm_fnc_canPickUpAmmo
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit", "_target"];
2015-08-15 17:23:02 +00:00
!(isNull _unit || {!(_unit isKindOf "CAManBase")} || {!local _unit} || { (_target distance _unit) > 7})