ACE3/addons/rearm/functions/fnc_canReadSupplyCounter.sqf
GitHawk d0509830e3 Some things
Made params nicer, replaced some forEach and used params in XEH_respawn
2016-05-12 14:55:40 +02:00

30 lines
582 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:
* [ammo_truck, player] call ace_rearm_fnc_canReadSupplyCounter
*
* Public: No
*/
#include "script_component.hpp"
params [
["_truck", objNull, [objNull]],
["_unit", objNull, [objNull]]
];
!(isNull _unit ||
{!(_unit isKindOf "CAManBase")} ||
{!local _unit} ||
{!alive _truck} ||
{(_truck distance _unit) > REARM_ACTION_DISTANCE} ||
{GVAR(supply) == 0})