2015-01-18 21:16:35 +00:00
|
|
|
/**
|
|
|
|
* 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-03-05 17:42:08 +00:00
|
|
|
(((GVAR(enabledFor) == 0 && (isPlayer _unit || (_unit getvariable [QEGVAR(common,isDeadPlayer), false])))) || (GVAR(enabledFor) == 1));
|
2015-01-18 21:16:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
_medicalEnabled;
|