ACE3/addons/cargo/functions/fnc_canShowUnloadAllVehicles.sqf

27 lines
547 B
Plaintext
Raw Normal View History

#include "script_component.hpp"
/*
* Author: Vdauphin
* Checks if unload all vehicles interaction can be show.
*
* Arguments:
* 0: Vehicle <OBJECT>
* 1: Unit <OBJECT>
*
* Return Value:
* Can show menu <BOOL>
*
* Example:
* [vehicle player, player] call ace_cargo_fnc_canShowUnloadAllVehicles
*
* Public: No
*/
params [
"_vehicle",
["_unit", player, [objNull]]
];
driver _vehicle isEqualTo _unit &&
{isClass (configOf _vehicle >> "VehicleTransport" >> "Carrier")} &&
2021-08-04 16:56:48 +00:00
{!([_vehicle] call FUNC(getVehicleCargo) isEqualTo [])}