ACE3/addons/captives/functions/fnc_canEscortCaptive.sqf

27 lines
584 B
Plaintext
Raw Normal View History

#include "..\script_component.hpp"
2015-02-04 19:16:19 +00:00
/*
* Author: PabstMirror
* Tests if can escort target (attach)
*
* Arguments:
* 0: Caller (player) <OBJECT>
* 1: Target <OBJECT>
2015-02-04 19:16:19 +00:00
*
* Return Value:
* Can escort <BOOL>
2015-02-04 19:16:19 +00:00
*
* 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
*/
params ["_unit", "_target"];
// Alive, handcuffed, not being escorted, 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)} &&
{_target call EFUNC(common,isAwake)} &&
{(vehicle _unit) == _unit} &&
{(vehicle _target) == _target}