2016-02-27 19:31:07 +00:00
|
|
|
/*
|
|
|
|
* 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:
|
2016-02-27 20:05:19 +00:00
|
|
|
* [ammo_truck, player] call ace_rearm_fnc_canReadSupplyCounter
|
2016-02-27 19:31:07 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2016-02-27 20:05:19 +00:00
|
|
|
params [["_truck", objNull, [objNull]], ["_unit", objNull, [objNull]]];
|
2016-02-27 19:31:07 +00:00
|
|
|
|
|
|
|
!(isNull _unit ||
|
|
|
|
{!(_unit isKindOf "CAManBase")} ||
|
|
|
|
{!local _unit} ||
|
2016-02-27 20:05:19 +00:00
|
|
|
{!alive _truck} ||
|
|
|
|
{(_truck distance _unit) > REARM_ACTION_DISTANCE} ||
|
2016-02-27 19:31:07 +00:00
|
|
|
{GVAR(supply) == 0})
|