{"name":"reload","title":"reload","type":"command","url":"https://community.bistudio.com/wiki/reload","revid":347639,"updated":"2023-10-03T09:06:43Z","groups":["Weapons"],"status":"ok","games":{"arma1":"1.00","arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma1 1.00","arma3_since":"0.50","description":"Main syntax: Reload first found muzzle that needs reloading (with some inconsistencies).\nAlternative syntax: this syntax allows to reload given muzzle with given magazine while playing proper animation.\nIf *param* is omitted or is empty string, default value is used. The default behaviour is to find the best matching magazine for the provided muzzle from the pool of available magazines.\nIf specific magazine is requested, the reload will fail if unit has run out of this type of magazines. If an empty array `[]` is given, the behaviour is similar to pressing the \"Reload\" key.\nThe command reloads the given muzzle but does not select it. In case of throwable muzzles, each throwable has its own muzzle, they are autoreloaded after throw.\nUsing reload on the throwable muzzle will just swap throwable for another one of the same type from inventory.","syntaxes":[{"syntax":"reload unitName","params":[{"name":"unitName","type":"Object","type_expr":"Object"}],"returns":{"type":"Nothing","type_expr":"Nothing"},"form":"unary","right":{"text":"unitName"}},{"syntax":"unit reload [muzzle, magazine]","since":"arma3 2.08","params":[{"name":"unit","type":"Object","description":"person","type_expr":"Object"},{"name":"muzzle","type":"String","optional":true,"default":"currentMuzzle","description":"muzzle name or \"\" for the current muzzle.","type_expr":"String","text":"muzzle: String - (Optional, default currentMuzzle) muzzle name or \"\" for the current muzzle."},{"name":"magazine","type":"String","optional":true,"default":"given muzzle magazine","description":"magazine name or \"\" for given muzzle's magazine. If given muzzle is currentMuzzle then currentMagazine","type_expr":"String","text":"magazine: String - (Optional, default given muzzle magazine) magazine name or \"\" for given muzzle's magazine. If given muzzle is currentMuzzle then currentMagazine"}],"returns":{"type":"Boolean","type_expr":"Boolean","description":"true on success"},"form":"binary","left":{"text":"unit"},"right":{"text":"[muzzle, magazine]"}}],"examples":[{"code":["if (needReload player == 1) then { reload player };"]},{"code":["player reload [\"GL_3GL_F\", \"1Rnd_HE_Grenade_shell\"];"]},{"text":"Reload current muzzle:\n\n```sqf\nplayer reload [];\n```","code":["player reload [];"]}],"see_also":["reloadEnabled","needReload","enableReload","setWeaponReloadingTime"]}