2023-09-12 18:58:10 +00:00
|
|
|
#include "..\script_component.hpp"
|
2015-02-04 19:16:19 +00:00
|
|
|
/*
|
|
|
|
* Author: PabstMirror
|
2015-02-05 22:39:45 +00:00
|
|
|
* Checks the conditions for being able to apply handcuffs
|
2015-02-04 19:16:19 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: caller (player) <OBJECT>
|
|
|
|
* 1: target <OBJECT>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* The return value <BOOL>
|
|
|
|
*
|
|
|
|
* Example:
|
2015-02-06 23:03:56 +00:00
|
|
|
* [player, bob] call ACE_captives_fnc_doApplyHandcuffs;
|
2015-02-04 19:16:19 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2015-08-04 23:15:20 +00:00
|
|
|
params ["_unit", "_target"];
|
2015-02-07 05:23:33 +00:00
|
|
|
|
|
|
|
playSound3D [QUOTE(PATHTO_R(sounds\cable_tie_zipping.ogg)), objNull, false, (getPosASL _target), 1, 1, 10];
|
|
|
|
|
2021-09-03 19:38:49 +00:00
|
|
|
[QGVAR(setHandcuffed), [_target, true, _unit], [_target]] call CBA_fnc_targetEvent;
|
2015-08-04 23:15:20 +00:00
|
|
|
|
2023-08-30 21:03:44 +00:00
|
|
|
private _cuffs = (_unit call EFUNC(common,uniqueItems)) arrayIntersect GVAR(restraints);
|
|
|
|
|
|
|
|
_unit removeItem (_cuffs#0);
|