mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
ee0e947611
* Use `ace_common_fnc_isAwake` where possible * Revert bad change
27 lines
584 B
Plaintext
27 lines
584 B
Plaintext
#include "..\script_component.hpp"
|
|
/*
|
|
* Author: PabstMirror
|
|
* Tests if can escort target (attach)
|
|
*
|
|
* Arguments:
|
|
* 0: Caller (player) <OBJECT>
|
|
* 1: Target <OBJECT>
|
|
*
|
|
* Return Value:
|
|
* Can escort <BOOL>
|
|
*
|
|
* Example:
|
|
* [player, bob] call ACE_captives_fnc_canEscortCaptive
|
|
*
|
|
* Public: No
|
|
*/
|
|
|
|
params ["_unit", "_target"];
|
|
// Alive, handcuffed, not being escorted, and not unconscious
|
|
|
|
(_target getVariable [QGVAR(isHandcuffed), false]) &&
|
|
{isNull (attachedTo _target)} &&
|
|
{_target call EFUNC(common,isAwake)} &&
|
|
{(vehicle _unit) == _unit} &&
|
|
{(vehicle _target) == _target}
|