mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
36 lines
1.0 KiB
Plaintext
36 lines
1.0 KiB
Plaintext
|
/**
|
||
|
* fnc_handleTreatment_Action_tourniquet.sqf
|
||
|
* @Descr: N/A
|
||
|
* @Author: Glowbal
|
||
|
*
|
||
|
* @Arguments: []
|
||
|
* @Return:
|
||
|
* @PublicAPI: false
|
||
|
*/
|
||
|
|
||
|
#include "script_component.hpp"
|
||
|
|
||
|
private ["_caller","_target","_part","_selectionName","_removeItem", "_tourniquets"];
|
||
|
_caller = _this select 0;
|
||
|
_target = _this select 1;
|
||
|
_selectionName = _this select 2;
|
||
|
_removeItem = _this select 3;
|
||
|
|
||
|
_part = [_selectionName] call FUNC(getBodyPartNumber);
|
||
|
if (_part == 0 || _part == 1) exitwith {
|
||
|
[_caller,"You cannot apply a CAT on this body part!"] call EFUNC(common,sendHintTo);
|
||
|
false;
|
||
|
};
|
||
|
|
||
|
[_caller, _target, _removeItem] call FUNC(useEquipment);
|
||
|
|
||
|
_tourniquets = [_target, QGVAR(tourniquets)] call EFUNC(common,getDefinedVariable);
|
||
|
if ((_tourniquets select _part) > 0) exitwith {
|
||
|
[_caller,"There is already a tourniquet on this body part!"] call EFUNC(common,sendHintTo);
|
||
|
false;
|
||
|
};
|
||
|
|
||
|
[_caller, _unit,_removeItem] call FUNC(useEquipment);
|
||
|
[[_caller, _target, _selectionName, _removeItem], QUOTE(FUNC(tourniquetLocal)), _unit] call EFUNC(common,execRemoteFnc);
|
||
|
|
||
|
true
|