ACE3/addons/captives/functions/fnc_canStopEscorting.sqf

28 lines
582 B
Plaintext
Raw Normal View History

2015-02-04 19:16:19 +00:00
/*
* Author: PabstMirror
* Tests if player can stop escorting
*
* Arguments:
* 0: caller (player) <OBJECT>
* 1: target <OBJECT><OPTIONAL>
*
* Return Value:
* The return value <BOOL>
*
* Example:
2015-02-06 23:03:56 +00:00
* [player, bob] call ACE_captives_fnc_canStopEscorting
2015-02-04 19:16:19 +00:00
*
* Public: No
*/
#include "script_component.hpp"
params ["_unit", ["_target", objNull]];
2015-02-04 19:16:19 +00:00
if (isNull _target) then {
2015-02-06 05:11:28 +00:00
_target = _unit getVariable [QGVAR(escortedUnit), objNull];
2015-02-04 19:16:19 +00:00
};
if (isNull _target) exitWith {false};
2015-02-04 19:16:19 +00:00
(_target in (attachedObjects _unit)) && {_target getVariable [QGVAR(isHandcuffed), false]}