ACE3/addons/cargo/functions/fnc_canShowUnloadAllVehicles.sqf
Vdauphin 370b07105d
Use new command configOf
Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
2020-11-07 09:58:23 +01:00

27 lines
579 B
Plaintext

#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")} &&
{!(getVehicleCargo _vehicle - (_vehicle getVariable [QGVAR(loaded), []]) isEqualTo [])}