2015-08-15 16:43:13 +00:00
|
|
|
/*
|
|
|
|
* Author: GitHawk
|
2015-08-18 00:32:10 +00:00
|
|
|
* Check if a unit can pick up ammo.
|
2015-08-15 16:43:13 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2015-08-18 01:37:02 +00:00
|
|
|
* 0: Target <OBJECT>
|
|
|
|
* 1: Unit <OBJECT>
|
2015-08-15 16:43:13 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2015-08-18 00:32:10 +00:00
|
|
|
* Can Pick Up Ammo <BOOL>
|
2015-08-15 16:43:13 +00:00
|
|
|
*
|
|
|
|
* Example:
|
2015-08-16 00:18:53 +00:00
|
|
|
* [player, tank] call ace_rearm_fnc_canPickUpAmmo
|
2015-08-15 16:43:13 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-18 01:37:02 +00:00
|
|
|
params ["_target", "_unit"];
|
2015-08-15 16:43:13 +00:00
|
|
|
|
2015-08-18 00:32:10 +00:00
|
|
|
!(isNull _unit || {!(_unit isKindOf "CAManBase")} || {!local _unit} || {(_target distance _unit) > REARM_ACTION_DISTANCE})
|