ACE3/addons/captives/functions/fnc_canEscortCaptive.sqf

27 lines
554 B
Plaintext
Raw Normal View History

2015-02-04 19:16:19 +00:00
/*
* Author: PabstMirror
* Tests if can escort target (attach)
*
* Arguments:
* 0: caller (player) <OBJECT>
2015-02-06 23:03:56 +00:00
* 1: target <OBJECT>
2015-02-04 19:16:19 +00:00
*
* Return Value:
* The return value <BOOL>
*
* Example:
2015-02-06 23:03:56 +00:00
* [player, bob] call ACE_captives_fnc_canEscortCaptive
2015-02-04 19:16:19 +00:00
*
* Public: No
*/
#include "script_component.hpp"
PARAMS_2(_unit,_target);
2015-02-07 04:24:27 +00:00
//Alive, handcuffed, not being escored, and not unconscious
2015-02-06 05:11:28 +00:00
2015-02-06 09:38:27 +00:00
(_target getVariable [QGVAR(isHandcuffed), false]) &&
{isNull (attachedTo _target)} &&
{alive _target} &&
2015-02-07 04:24:27 +00:00
{!(_target getVariable ["ACE_isUnconscious", false])}