ACE3/addons/captives/functions/fnc_canRemoveHandcuffs.sqf

25 lines
530 B
Plaintext
Raw Normal View History

#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 remove 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_canRemoveHandcuffs
2015-02-04 19:16:19 +00:00
*
* Public: No
*/
params ["_unit", "_target"];
2015-02-04 19:16:19 +00:00
2015-02-05 22:39:45 +00:00
//Unit is handcuffed and not currently being escorted
2015-02-06 09:38:27 +00:00
_target getVariable [QGVAR(isHandcuffed), false] &&
{isNull (attachedTo _target)} &&
{(vehicle _target) == _target}