ammo: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
[[Category:Scripting Commands|AMMO]]
{{Command|= Comments
[[Category:Scripting Commands OFP 1.96|AMMO]]
____________________________________________________________________________________________
[[Category:Scripting Commands OFP 1.46|AMMO]]
 
[[Category:Scripting Commands ArmA|AMMO]]
| ofp |= Game name
 
|1.00|= Game version


|arg= global |= Arguments in MP
____________________________________________________________________________________________


<h2 style="color:#000066">'''''unit'' ammo ''magazine'''''</h2>
| Check how many rounds are left in the currently loaded magazine of the given weapon. |= Description
____________________________________________________________________________________________


| unit '''ammo''' weaponName |= Syntax


'''Operand types:'''
|p1= unit: [[Object]] |= Parameter 1


'''unit:''' [[Object]]
|p2= weaponName: [[String]] - muzzle name. See the topic [[Weapon, Muzzle and Magazine Names]] for reference about possible values. |= Parameter 2


'''magazine:''' [[String]]
| [[Integer]] |= Return value
____________________________________________________________________________________________
 
|x1= <pre>player ammo "M16"</pre>


'''Type of returned value:'''
returns 30 in case of a full magazine |= Example 1
____________________________________________________________________________________________


[[Number]]
| [[someAmmo]] |= See also


'''Description:'''
}}


Count how many shots are left for given magazine type.
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
</dl>


'''Example:'''
<h3 style="display:none">Bottom Section</h3>


player '''ammo''' "M16"
[[Category:Scripting Commands|AMMO]]
[[Category:Scripting Commands OFP 1.96|AMMO]]
[[Category:Scripting Commands OFP 1.46|AMMO]]
[[Category:Scripting Commands ArmA|AMMO]]

Revision as of 21:59, 1 August 2006

Hover & click on the images for description

Description

Description:
Check how many rounds are left in the currently loaded magazine of the given weapon.
Groups:
Uncategorised

Syntax

Syntax:
unit ammo weaponName
Parameters:
unit: Object
weaponName: String - muzzle name. See the topic Weapon, Muzzle and Magazine Names for reference about possible values.
Return Value:
Integer

Examples

Example 1:
player ammo "M16"
returns 30 in case of a full magazine

Additional Information

See also:
someAmmo

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

Notes

Bottom Section