{"name":"currentWeapon","title":"currentWeapon","type":"command","url":"https://community.bistudio.com/wiki/currentWeapon","revid":379411,"updated":"2026-10-31T00:02:57Z","groups":["Weapons","Unit Inventory"],"status":"ok","games":{"arma2":"1.00","arma2oa":"1.50","tkoh":"1.00","arma3":"0.50"},"since":"arma2 1.00","arma3_since":"0.50","description":"Return the name of the currently selected weapon (on the primary turret for vehicles).","syntaxes":[{"syntax":"currentWeapon vehicle","params":[{"name":"vehicle","type":"Object","type_expr":"Object"}],"returns":{"type":"String","type_expr":"String"},"form":"unary","right":{"text":"vehicle"}}],"examples":[{"code":["_weaponClass = currentWeapon (vehicle player);//Example: \"M16A2GL\""]},{"code":["_weaponClass = currentWeapon player;"]}],"see_also":["currentMagazine","currentMuzzle","currentThrowable","currentVisionMode","currentWeaponMode","currentZeroing","magazinesTurret","weaponsTurret","currentWeaponTurret","weaponState"],"notes":[{"user":"Lou Montana","date":"2009-07-15T02:00:00Z","text":"You have to make a little delay (sleep 0.001; (not less)) to use this command, else you will be returned an empty string."},{"user":"Lou Montana","date":"2009-07-15T02:00:00Z","text":"It seems it is not working in 1.02 for other unit than player."},{"user":"Terox","date":"2010-05-04T00:00:00Z","text":"This works for vehicles providing there is a gunner"}]}