Adds an object or objects to the object cargo of a container (another object). If a string is passed, a new object of that type is created. No test is done to see if the container could actually hold the cargo (no size / weight restrictions). Object cargo is used to store objects, such as cell phones or ammunition cans, which are not weapons or magazines.
Note: Must be called where the container is local.
|Syntax:||[cargo, container] call fn_vbs_objectCargo_add|
|Return Value:||Boolean - Returns true, if successfully added to the cargo, false otherwise.|
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. More Category VBS Scripting Functions.
[[cone1, "vbs2_ied_object_mobile_phone"], player] call fn_vbs_objectCargo_add
["vbs2_ied_object_mobile_phone", car1] call fn_vbs_objectCargo_add
|See also:||fn vbs objectCargo get, fn vbs objectCargo remove|