2015-02-21 23:44:11 +00:00
|
|
|
/*
|
|
|
|
* Author: Glowbal
|
|
|
|
* Check if unit has a tourniquet applied to the specified bodypart
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The Unit <OBJECT>
|
2016-10-05 22:54:57 +00:00
|
|
|
* 1: Body Part <STRING>
|
2015-02-21 23:44:11 +00:00
|
|
|
*
|
2017-06-08 13:31:51 +00:00
|
|
|
* Return Value:
|
2015-02-21 23:44:11 +00:00
|
|
|
* Has tourniquet applied <BOOL>
|
|
|
|
*
|
2017-04-22 15:57:32 +00:00
|
|
|
* Example:
|
2018-07-18 10:09:48 +00:00
|
|
|
* [player, "leftleg"] call ace_medical_treatment_fnc_hasTourniquetAppliedTo
|
2017-04-22 15:57:32 +00:00
|
|
|
*
|
2018-07-18 10:09:48 +00:00
|
|
|
* Public: No
|
2015-02-21 23:44:11 +00:00
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2016-10-05 22:54:57 +00:00
|
|
|
params ["_target", "_bodyPart"];
|
2015-02-21 23:44:11 +00:00
|
|
|
|
2016-12-07 10:32:01 +00:00
|
|
|
private _index = ALL_BODY_PARTS find toLower _bodyPart;
|
|
|
|
|
|
|
|
if (_index < 0) exitWith { false };
|
|
|
|
|
2018-07-15 13:00:16 +00:00
|
|
|
((_target getVariable [QEGVAR(medical,tourniquets), [0,0,0,0,0,0]]) select _index) > 0
|