I've not been able to find a command or function that will return the number of empty or not occupied cargo spaces that can hold infantry in a vehicle.
I'm making a script which would spawn a vehicle, which I then want to fill with random infantry of a given side.
I'd prefer to first query the size of the available cargo, then use this value as an iterator to fill the vehicles cargo.
At the moment, I have to look online for the target vehicles cargo capacity then hard code that into the script.