2015-08-22 14:25:10 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Check if unit has CMS enabled
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: unit <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* enabled <BOOL>
|
2015-01-18 21:16:35 +00:00
|
|
|
*
|
2015-08-22 14:25:10 +00:00
|
|
|
* Example:
|
|
|
|
* [Unit] call ace_medical_fnc_hasMedicalEnabled
|
|
|
|
*
|
|
|
|
* Public: No
|
2015-01-18 21:16:35 +00:00
|
|
|
*/
|
2017-06-08 13:31:51 +00:00
|
|
|
|
2015-01-18 21:16:35 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-22 14:25:10 +00:00
|
|
|
params ["_unit"];
|
2015-01-18 21:16:35 +00:00
|
|
|
|
2016-06-13 00:34:56 +00:00
|
|
|
private _medicalEnabled = _unit getVariable QGVAR(enableMedical);
|
2015-11-30 16:22:16 +00:00
|
|
|
if (isNil "_medicalEnabled") exitWith {
|
2015-11-30 16:27:09 +00:00
|
|
|
(((GVAR(enableFor) == 0 && (isPlayer _unit || (_unit getVariable [QEGVAR(common,isDeadPlayer), false])))) || (GVAR(enableFor) == 1) || GVAR(level) == 1)
|
2015-01-18 21:16:35 +00:00
|
|
|
};
|
|
|
|
|
2015-08-22 14:25:10 +00:00
|
|
|
_medicalEnabled
|