ACE3/addons/captives/functions/fnc_canUnloadCaptive.sqf

29 lines
729 B
Plaintext
Raw Normal View History

2015-02-03 02:04:50 +00:00
/*
* Author: commy2
* Check if the unit can unload a captive from the vehicle.
*
* Arguments:
* 0: Unit that wants to unload a captive <OBJECT>
* 1: A captive. ObjNull for the first escorted captive <OBJECT>
* 2: Vehicle to unload a captive from <OBJECT>
*
* Return Value:
* The return value <BOOL>
*
* Example:
2015-02-06 23:03:56 +00:00
* [player, bob, car1] call ACE_captives_fnc_canUnloadCaptive;
2015-02-03 02:04:50 +00:00
*
* Public: No
*/
#include "script_component.hpp"
private ["_cargo"];
PARAMS_2(_unit,_vehicle);
_cargo = crew _vehicle; // Can also unload from driver, gunner, commander, turret positions. They shouldn't be there anyway.
2015-02-05 22:39:45 +00:00
_cargo = [_cargo, {_this getVariable [QGVAR(isHandcuffed), false]}] call EFUNC(common,filter);
2015-02-03 02:04:50 +00:00
count _cargo > 0