canDeployWeapon: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "{{RV|type=command |game1= arma3 |version1= 2.06 |branch = dev |gr1= Weapons |arg= local |descr= Returns true if player's weapon can be deployed. |s1= [[canDeployWeapon]...")
 
m (Some wiki formatting)
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
|game1= arma3
|game1= arma3
|version1= 2.06
|version1= 2.06
|branch = dev
 
|gr1= Weapons
|gr1= Weapons
|arg= local
|arg= local


|descr= Returns [[true]] if player's weapon can be deployed.
|descr= Returns [[true]] if a unit's weapon can be deployed.


|s1= [[canDeployWeapon]] unit
|s1= [[canDeployWeapon]] unit
|p1=  unit : [[Object]]


|r1= [[Boolean]] : [[true]] - if weapon can be deployed
|p1= unit : [[Object]]
 
|r1= [[Boolean]] - [[true]] if unit's weapon can be deployed


|x1=
|x1= <sqf>if (canDeployWeapon player) then { hint "I could rest my weapon here..." };</sqf>
Execute on server: <code>[[private]] _canDeploy = [[canDeployWeapon]] [[player]];</code>


|seealso= [[isWeaponDeployed]], [[isWeaponRested]]
|seealso= [[isWeaponDeployed]] [[isWeaponRested]]
}}
}}

Latest revision as of 20:08, 5 May 2022

Hover & click on the images for description

Description

Description:
Returns true if a unit's weapon can be deployed.
Groups:
Weapons

Syntax

Syntax:
canDeployWeapon unit
Parameters:
unit : Object
Return Value:
Boolean - true if unit's weapon can be deployed

Examples

Example 1:
if (canDeployWeapon player) then { hint "I could rest my weapon here..." };

Additional Information

See also:
isWeaponDeployed isWeaponRested

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note