{"name":"getCargoIndex","operator":null,"title":"getCargoIndex","type":"command","url":"https://community.bistudio.com/wiki/getCargoIndex","revid":369168,"updated":"2024-09-03T10:34:42Z","groups":["Object Manipulation"],"status":"ok","replaced_by":[],"games":[{"game":"arma3","name":"Arma 3","version":"1.26"}],"since":{"game":"arma3","name":"Arma 3","version":"1.26"},"arma3_since":"1.26","branch":null,"locality":{"argument":"global","effect":null,"server_exec":false},"exec":null,"description":"Returns index of the unit in cargo. -1 if not in cargo.","syntaxes":[{"syntax":"vehicle getCargoIndex unit","since":null,"effect":null,"exec":null,"params":[{"name":"vehicle","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"vehicle: Object"},{"name":"unit","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unit: Object"}],"returns":{"type":"Number","types":["Number"],"description":null,"text":"Number"},"form":"binary","operator":null,"left":{"text":"vehicle","types":["Object"]},"right":{"text":"unit","types":["Object"]}}],"examples":[{"text":"```sqf\nplayer moveInCargo heli;\nhint str (heli getCargoIndex player);\n```","code":["player moveInCargo heli;\nhint str (heli getCargoIndex player);"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["moveInCargo","assignAsCargoIndex","emptyPositions"],"notes":[],"categories":["Arma 3: New Scripting Commands","Arma 3: Scripting Commands","Command Group: Object Manipulation","Introduced with Arma 3 version 1.26","Scripting Commands"]}