{"name":"reload","operator":null,"title":"reload","type":"command","url":"https://community.bistudio.com/wiki/reload","revid":347639,"updated":"2023-10-03T09:06:43Z","groups":["Weapons"],"status":"ok","replaced_by":[],"games":[{"game":"arma1","name":"Armed Assault","version":"1.00"},{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma1","name":"Armed Assault","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Main syntax: Reload first found muzzle that needs reloading (with some inconsistencies).\n\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","since":null,"effect":null,"exec":null,"params":[{"name":"unitName","type":"Object","optional":false,"default":null,"description":null,"types":["Object"],"since":null,"text":"unitName: Object"}],"returns":{"type":"Nothing","types":["Nothing"],"description":null,"text":"Nothing"},"form":"unary","operator":null,"left":null,"right":{"text":"unitName","types":["Object"]}},{"syntax":"unit reload [muzzle, magazine]","since":"arma3 2.08","effect":null,"exec":null,"params":[{"name":"unit","type":"Object","optional":false,"default":null,"description":"person","types":["Object"],"since":null,"text":"unit: Object - person"},{"name":"muzzle","type":"String","optional":true,"default":"currentMuzzle","description":"muzzle name or \"\" for the current muzzle.","types":["String"],"since":null,"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","types":["String"],"since":null,"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","types":["Boolean"],"description":"true on success","text":"Boolean - true on success"},"form":"binary","operator":null,"left":{"text":"unit","types":["Object"]},"right":{"text":"[muzzle, magazine]","types":["Array"]}}],"examples":[{"text":"```sqf\nif (needReload player == 1) then { reload player };\n```","code":["if (needReload player == 1) then { reload player };"]},{"text":"```sqf\nplayer reload [\"GL_3GL_F\", \"1Rnd_HE_Grenade_shell\"];\n```","code":["player reload [\"GL_3GL_F\", \"1Rnd_HE_Grenade_shell\"];"]},{"text":"Reload current muzzle:\n\n```sqf\nplayer reload [];\n```","code":["player reload [];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["reloadEnabled","needReload","enableReload","setWeaponReloadingTime"],"notes":[],"categories":["ArmA: Armed Assault: New Scripting Commands","ArmA: Armed Assault: Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Weapons","Introduced with Armed Assault version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}