{"name":"setVehicleCargo","title":"setVehicleCargo","type":"command","url":"https://community.bistudio.com/wiki/setVehicleCargo","revid":349523,"updated":"2023-11-08T17:15:54Z","groups":["Vehicle in Vehicle Transport"],"status":"ok","games":{"arma3":"1.62"},"since":"arma3 1.62","arma3_since":"1.62","locality":{"effect":"global"},"description":"Load cargo vehicle inside vehicle if possible, returns bool based on whether the vehicle was able to be loaded. Can also be used to unload a specific loaded vehicle or all loaded vehicles.","syntaxes":[{"syntax":"vehicle setVehicleCargo cargo","params":[{"name":"vehicle","type":"Object","description":"vehicle for carrying cargo, objNull to unload specific loaded cargo","type_expr":"Object"},{"name":"cargo","type":"Object","description":"cargo to put/loaded in vehicle, objNull to unload all loaded cargo","type_expr":"Object"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"whether or not operation was a success"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"cargo"}}],"examples":[{"text":"Blackfish with no vehicle cargo loaded\n\n```sqf\nprivate _success = blackfish setVehicleCargo offroad; // true\n```","code":["private _success = blackfish setVehicleCargo offroad; // true"]},{"text":"Blackfish with full cargo already loaded\n\n```sqf\nprivate _success = blackfish setVehicleCargo offroad; // false\n```","code":["private _success = blackfish setVehicleCargo offroad; // false"]},{"text":"Unload specific loaded vehicle (will paradrop if dropped from high altitude)\n\n```sqf\nprivate _success = objNull setVehicleCargo offroad;\n```","code":["private _success = objNull setVehicleCargo offroad;"]},{"text":"Unload all vehicles (will paradrop if dropped from high altitude)\n\n```sqf\nprivate _success = blackfish setVehicleCargo objNull;\n```","code":["private _success = blackfish setVehicleCargo objNull;"]}],"see_also":["Arma 3: Vehicle in Vehicle Transport","canVehicleCargo","enableVehicleCargo","getVehicleCargo","isVehicleCargo","vehicleCargoEnabled"],"notes":[{"user":"ImperialAlex","date":"2016-07-04T18:46:00Z","text":"`objNull setVehicleCargo _cargoVehicle` - will unload specific loaded vehicle, and `_trasportVehicle setVehicleCargo objNull` will unload all vehicles. The unloaded vehicles will be paradropped if the altitude is high enough. See: [BIforums](https://forums.bistudio.com/topic/191678-vehicle-in-vehicle-transport-feedback/page-5#entry3056397)"}]}