ACE3/addons/medical/functions/fnc_hasMedicalEnabled.sqf

22 lines
521 B
Plaintext
Raw Normal View History

/**
* fn_hasMedicalEnabled.sqf
* @Descr: Check if unit has CMS enabled.
* @Author: Glowbal
*
* @Arguments: [unit OBJECT]
* @Return: BOOL
* @PublicAPI: true
*/
#include "script_component.hpp"
private ["_unit", "_medicalEnabled"];
_unit = _this select 0;
_medicalEnabled = _unit getvariable QGVAR(enableMedical);
if (isnil "_medicalEnabled") exitwith {
2015-05-08 18:10:40 +00:00
(((GVAR(enableFor) == 0 && (isPlayer _unit || (_unit getvariable [QEGVAR(common,isDeadPlayer), false])))) || (GVAR(enableFor) == 1));
};
_medicalEnabled;