{"name":"getCargoIndex","title":"getCargoIndex","type":"command","url":"https://community.bistudio.com/wiki/getCargoIndex","revid":369168,"updated":"2024-09-03T10:34:42Z","groups":["Object Manipulation"],"status":"ok","games":{"arma3":"1.26"},"since":"arma3 1.26","arma3_since":"1.26","locality":{"argument":"global"},"description":"Returns index of the unit in cargo. -1 if not in cargo.","syntaxes":[{"syntax":"vehicle getCargoIndex unit","params":[{"name":"vehicle","type":"Object","type_expr":"Object"},{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Number","type_expr":"Number"},"form":"binary","left":{"text":"vehicle"},"right":{"text":"unit"}}],"examples":[{"code":["player moveInCargo heli;\nhint str (heli getCargoIndex player);"]}],"see_also":["moveInCargo","assignAsCargoIndex","emptyPositions"]}