mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
742626ff1a
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
28 lines
615 B
Plaintext
28 lines
615 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: PabstMirror
|
|
* Tests if player can stop escorting.
|
|
*
|
|
* Arguments:
|
|
* 0: Caller (player) <OBJECT>
|
|
* 1: Target <OBJECT> (default: objNull)
|
|
*
|
|
* Return Value:
|
|
* Can unit stop escorting another unit <BOOL>
|
|
*
|
|
* Example:
|
|
* [player, bob] call ACE_captives_fnc_canStopEscorting
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_unit", ["_target", objNull]];
|
|
|
|
if (isNull _target) then {
|
|
_target = _unit getVariable [QGVAR(escortedUnit), objNull];
|
|
};
|
|
|
|
if (isNull _target) exitWith {false};
|
|
|
|
(_target in (attachedObjects _unit)) && {_target getVariable [QGVAR(isHandcuffed), false]}
|