# Weapons (scripting commands)

- [aimedAtTarget](../../commands/aimedAtTarget.md): Returns how good a vehicle's weapon is aimed at the target.
- [canDeployWeapon](../../commands/canDeployWeapon.md): Returns true if a unit's weapon can be deployed.
- [canFire](../../commands/canFire.md): Returns true if the given vehicle is still able to fire. For the command to return true, vehicle must be alive, have weapon operator and the weapon cannot be damaged ≥ 0.9 but can be empty due to running out of ammo.
- [compatibleItems](../../commands/compatibleItems.md): Returns all items (attachments) that can be mounted on the given weapon.
- [compatibleMagazines](../../commands/compatibleMagazines.md): Returns all magazines that can be loaded in the given weapon or all magazines containing the provided ammo. No compatible magazines are returned for submunition or missiles.
- [compatibleWeapons](../../commands/compatibleWeapons.md): Returns all compatible weapons for given weapon item, weapon magazine or weapon slot.
- [currentMuzzle](../../commands/currentMuzzle.md): Returns a unit's current weapon muzzle. Does not work on vehicles.
- [currentThrowable](../../commands/currentThrowable.md): Returns currently selected throwable (and the muzzle it is loaded into), which will be launched if the user presses <kbd>G</kbd>.
- [currentVisionMode](../../commands/currentVisionMode.md): Returns current vision mode of unit's weapon. Vision mode could be one of: - 0 - normal vision - 1 - night vision - 2 - thermal vision Alternative syntaxes additionally return FLIR index (see setCamUseTI) of the thermal…
- [currentWeapon](../../commands/currentWeapon.md): Return the name of the currently selected weapon (on the primary turret for vehicles).
- [currentWeaponMode](../../commands/currentWeaponMode.md): Returns current weapon mode of unit's weapon.
- [currentZeroing](../../commands/currentZeroing.md): Returns current zeroing.
- [disableNVGEquipment](../../commands/disableNVGEquipment.md): Enables or disables transport NV (Night Vision). To disable TI (Thermal Imaging) use disableTIEquipment.
- [disableTIEquipment](../../commands/disableTIEquipment.md): Disables TI (Thermal Imaging) equipment for given vehicle.
- [enableGunLights](../../commands/enableGunLights.md): Toggles the target group's gun lights. disableAI "LIGHTS" will disable the use of gun lights.
- [enableIRLasers](../../commands/enableIRLasers.md): Allows the AI to use IR lasers. Units should be in "Combat" behaviour.
- [enableReload](../../commands/enableReload.md): Enable / disable auto-reload (including AI) when magazine is empty. Default - enabled.
- [enableWeaponDisassembly](../../commands/enableWeaponDisassembly.md): Enables or disables disassembly of static weapons. Could be applied to local player, to another unit or to static weapon directly.
- [fire](../../commands/fire.md): Forces a unit to fire the given weapon.
- [fireAtTarget](../../commands/fireAtTarget.md): Remotely forces a unit to fire the given weapon. See also BIS_fnc_fire.
- [forceWeaponFire](../../commands/forceWeaponFire.md): The unit will be forced to fire weapon from the given muzzle. The weapon will not fire if firemode passed as parameter is not supported by the given muzzle.
- [getShotParents](../../commands/getShotParents.md): Returns shot information for the given projectile. If shot was fired by a soldier on foot or in FFV position in vehicle, the soldier is returned for the vehicle.
- [getWeaponSway](../../commands/getWeaponSway.md): Returns current size of weapon sway of a given unit, in radians. This command may still return a value greater 0 even if sway was effectively set to 0 with `player setCustomAimCoef 0;`.
- [hasWeapon](../../commands/hasWeapon.md): Checks if a unit has the given weapon in hands or on back/in holster. Weapons inside unit containers such as vest and backpack are not counted.
- [isFlashlightOn](../../commands/isFlashlightOn.md): Returns true if there is a linked and enabled flashlight on a given weapon.
- [isLaserOn](../../commands/isLaserOn.md): Returns true if the vehicle has its laser turned on. Not to be confused with isIRLaserOn which is for units. Main syntax is for primary gunner turret.
- [isManualFire](../../commands/isManualFire.md): Returns true if manual fire is on. Manual fire could either be selected in vehicle action menu (if available) or with action "ManualFire" and "ManualFireCancel". Always returns false for a soldier.
- [isThrowable](../../commands/isThrowable.md): Returns true if the given magazine is a throwable.
- [isWeaponDeployed](../../commands/isWeaponDeployed.md): Returns true if weapon is currently deployed.
- [isWeaponRested](../../commands/isWeaponRested.md): Returns true if weapon is currently rested.
- [laserTarget](../../commands/laserTarget.md): Returns the laser target object created by given unit (vehicle or soldier) when using a laser targeting device. The main syntax targets the primary gunner turret.
- [loadMagazine](../../commands/loadMagazine.md): Initiates the loading action on given weapon of the turret of a transport. So the new magazine is not available instantly, yet according to the reloadTime.
- [missileState](../../commands/missileState.md): Get the provided *guided* missile's engine, target lock and flight profile states.
- [missileTarget](../../commands/missileTarget.md): Returns a guided missile's target.
- [missileTargetPos](../../commands/missileTargetPos.md): Returns a guided missile's target position.
- [needReload](../../commands/needReload.md): Returns how much vehicle wants to reload its weapons.
- [reload](../../commands/reload.md): Main syntax: Reload first found muzzle that needs reloading (with some inconsistencies).
- [reloadEnabled](../../commands/reloadEnabled.md): A getter for enableReload. The value returned is wether or not auto-reload is enabled for current client only.
- [selectThrowable](../../commands/selectThrowable.md): Selects current throwable, which will be launched if the user presses <kbd>G</kbd>.
- [selectWeapon](../../commands/selectWeapon.md): Selects the given weapon.
- [setMissileTarget](../../commands/setMissileTarget.md): Sets a guided missile target. Does not work for all types of missiles. If the target is dead, it is ignored. The target has to be inside the missile's configured targeting cone for the command to work.
- [setMissileTargetPos](../../commands/setMissileTargetPos.md): Sets a guided munition target position. The munition must have `manualControl` config entry to use this command. The target position has to be inside the missile's configured targeting cone for the command to work.
- [setShotParents](../../commands/setShotParents.md): Sets vehicle and instigator pair for the given projectile.
- [setWeaponReloadingTime](../../commands/setWeaponReloadingTime.md): Sets reloading phase on the given weapon's current ammo round.
- [setWeaponZeroing](../../commands/setWeaponZeroing.md): Sets zeroing of given weapon and muzzle for given unit or vehicle.
- [throwables](../../commands/throwables.md): Returns all throwables in unit inventory in currentThrowable format.
- [weaponDirection](../../commands/weaponDirection.md): Returns the direction that the vehicle weapon is aiming in. For addons the weapon name must be an entry in CfgWeapons.
- [weaponDisassemblyEnabled](../../commands/weaponDisassemblyEnabled.md): Returns if weapon disassembly is enabled. As disassembly can be enabled/disabled on both player and weapon, it might be necessary to check both.
- [weaponInertia](../../commands/weaponInertia.md): Returns current rate of how much the weapon view is distorted because of quick aiming.
- [weaponLowered](../../commands/weaponLowered.md): Returns true if given soldier's weapon is lowered.
- [weaponReloadingTime](../../commands/weaponReloadingTime.md): Returns current ammo round reloading phase. For a magazine reloading phase see weaponState command.
- [weaponsInfo](../../commands/weaponsInfo.md): Returns entity's weapons information including weapon index and firemode.
- [weaponState](../../commands/weaponState.md): Returns the given or currently selected weapon state for unit or vehicle. With #Syntax 2, if no optional arguments are present, currently selected weapon is queried.
