{"name":"getUnitLoadout","title":"getUnitLoadout","type":"command","url":"https://community.bistudio.com/wiki/getUnitLoadout","revid":377568,"updated":"2026-01-02T06:55:51Z","groups":["Unit Inventory"],"status":"ok","games":{"arma3":"1.58"},"since":"arma3 1.58","arma3_since":"1.58","description":"Returns a **Unit Loadout Array** with all assigned items, weapons, containers and their stored items.\n\n> [!NOTE]\n> The config should contain the following standard entries:\n>\n> ```cpp\n> class MyLoadout\n> {\n>     uniformClass = \"U_B_CombatUniform_mcam\";\n>     backpack = \"B_AssaultPack_mcamo\";\n>     linkedItems[] = { \"V_PlateCarrier1_rgr\", \"H_HelmetB\", \"ItemCompass\", \"ItemWatch\", \"ItemRadio\", \"NVGoggles\" };\n>     weapons[] = { \"arifle_MX_ACO_pointer_F\", \"hgun_P07_F\" };\n>     items[] = { \"FirstAidKit\", \"FirstAidKit\", \"FirstAidKit\" };\n>     magazines[] = {\n>         \"30Rnd_65x39_caseless_mag\", \"16Rnd_9x21_Mag\",\n>         \"SmokeShell\",\n>         \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\",\n>         \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\",\n>         \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\", \"HandGrenade\"\n>     };\n> };\n> ```","syntaxes":[{"syntax":"getUnitLoadout unit","params":[{"name":"unit","type":"Object","type_expr":"Object"}],"returns":{"type":"Unit Loadout Array","type_expr":"Unit Loadout Array"},"form":"unary","right":{"text":"unit"}},{"syntax":"getUnitLoadout [unit, fullMagazines]","params":[{"name":"unit","type":"Object","type_expr":"Object"},{"name":"fullMagazines","type":"Boolean","description":"true to top up used magazines","type_expr":"Boolean"}],"returns":{"type":"Unit Loadout Array","type_expr":"Unit Loadout Array"},"form":"unary","right":{"text":"[unit, fullMagazines]"}},{"syntax":"getUnitLoadout name","params":[{"name":"name","type":"String","description":"`CfgVehicles` classname from which to extract the loadout","type_expr":"String"}],"returns":{"type":"Unit Loadout Array","type_expr":"Unit Loadout Array"},"form":"unary","right":{"text":"name"}},{"syntax":"getUnitLoadout config","params":[{"name":"config","type":"Config","description":"loadout config class","type_expr":"Config"}],"returns":{"type":"Unit Loadout Array","type_expr":"Unit Loadout Array"},"form":"unary","right":{"text":"config"}}],"examples":[{"code":["getUnitLoadout player;"]},{"code":["getUnitLoadout [player, true];"]},{"code":["getUnitLoadout \"B_Soldier_F\";"]},{"code":["getUnitLoadout (configFile >> \"CfgVehicles\" >> \"B_Soldier_F\");"]},{"code":["getUnitLoadout (missionConfigFile >> \"MyLoadout\");"]}],"see_also":["setUnitLoadout"]}