mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
9162789579
Added dummy objects Added carrying Added dropping Added storing Added more progress bars ...
26 lines
509 B
Plaintext
26 lines
509 B
Plaintext
/*
|
|
* Author: GitHawk
|
|
* Check if a unit can pick up ammo.
|
|
*
|
|
* Arguments:
|
|
* 0: Target <OBJECT>
|
|
* 1: Unit <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Can Pick Up Ammo <BOOL>
|
|
*
|
|
* Example:
|
|
* [player, tank] call ace_rearm_fnc_canTakeAmmo
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params ["_target", "_unit"];
|
|
|
|
!(isNull _unit ||
|
|
{!(_unit isKindOf "CAManBase")} ||
|
|
{!local _unit} ||
|
|
{(_target distance _unit) > REARM_ACTION_DISTANCE} ||
|
|
{!isNull (_unit getVariable [QGVAR(dummy), objNull])})
|