ACE3/addons/cargo/functions/fnc_unloadAllVehicles.sqf
Vdauphin 0025268eb0 fix twice parachute
- acify
2021-08-04 18:56:48 +02:00

27 lines
658 B
Plaintext

#include "script_component.hpp"
/*
* Author: Vdauphin
* Unload all vehicles but not ACE Cargo.
*
* Arguments:
* 0: Vehicle <OBJECT>
*
* Return Value:
* Loaded vehicles not part of ACE Cargo <ARRAY>
*
* Example:
* [vehicle player] call ace_cargo_fnc_unloadAllVehicles
*
* Public: No
*/
params ["_vehicle"];
private _loadedVehicles = [_vehicle] call FUNC(getVehicleCargo);
private _unloadingInterval = getNumber (configOf _vehicle >> "VehicleTransport" >> "Carrier" >> "unloadingInterval");
{
[{objnull setVehicleCargo _this}, _x, _forEachIndex * _unloadingInterval] call CBA_fnc_waitAndExecute;
} forEach _loadedVehicles;
_loadedVehicles