Page tree
Skip to end of metadata
Go to start of metadata

Introduced in

Version:18.3.0

Description

Description:

Allows an administrator to unload a vehicle from a configured cargo space.

Each time the function runs, the next unloadable vehicle in line in the cargo is unloaded, which is why the unloaded vehicle is not passed as a parameter - the last vehicle loaded is the first vehicle unloaded.

Note: Also works for vehicles with scripted cargo spaces, set up using fn_vbs_SetupCargoAreaForVehicle.

Syntax

Syntax:

[cv, cargoSpace] call fn_vbs_unloadVehicleFromVehicleHold

Parameters:
  • cv: Object - Cargo vehicle to unload from.
  • cargoSpace: String - Configured name of the cargo space. For all currently configured cargo vehicles, the cargo space name "CargoCompartment_01" is always used.
Return Value:Nothing

Warning

When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind — the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it.

Examples

Examples:
[c1, "CargoCompartment_01"] call fn_vbs_unloadVehicleFromVehicleHold

Additional Information

See also:fn_vbs_loadVehicleToVehicleHold, fn_vbs_SetupCargoAreaForVehicle
Multiplayer:
Problems:

Notes