mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
27 lines
570 B
Plaintext
27 lines
570 B
Plaintext
/*
|
|
* Author: GitHawk
|
|
* Checks if unit can read supply counter.
|
|
*
|
|
* Arguments:
|
|
* 0: Ammo Truck <OBJECT>
|
|
* 1: Unit <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Can read supply counter <BOOL>
|
|
*
|
|
* Example:
|
|
* [truck, player] call ace_rearm_fnc_canReadSupplyCounter
|
|
*
|
|
* Public: No
|
|
*/
|
|
#include "script_component.hpp"
|
|
|
|
params [["_target", objNull, [objNull]], ["_unit", objNull, [objNull]]];
|
|
|
|
!(isNull _unit ||
|
|
{!(_unit isKindOf "CAManBase")} ||
|
|
{!local _unit} ||
|
|
{!alive _target} ||
|
|
{(_target distance _unit) > REARM_ACTION_DISTANCE} ||
|
|
{GVAR(supply) == 0})
|