*Syntax*
ARRAY = getUnitsCargoFull OBJECT
Returns an array with all the units currently occupying cargo space of a vehicle.
Units are arranged by their respective cargo index while empty seats contain objNull.
Example: getUnitsCargoFull heli; //[ai1,ai2,<obj-null>,player1,player2,<obj-null>,<obj-null>,<obj-null>]
*Benefits*
Find out if vehicle can carry cargo and howmany
hint str (count getUnitsCargoFull veh);
find out if what cargo index player is sitting at
hint str ((getUnitsCargoFull veh) find player); //-1 not in cargo
get into first available cargo seat starting from 0
player moveInCargo [veh, (getUnitsCargoFull veh) find objNull];
*Current Problems*
There are about 3 commands in SQF to place unit into cargo position by Index and not 1 to get the cargo position index of the unit.
There are awkward workarounds, using assignAsCargoIndex command but assignedCargo can return units which are not even in the vehicle.
Returning array the length of all possible seats is very flexible solution to a bunch of cargo problems.