setAmmo: Difference between revisions
Jump to navigation
Jump to search
m (Command uses weapon class, not magazine class) |
Killzone Kid (talk | contribs) No edit summary |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| Set | | Set custom ammo count in the currently loaded magazine of the specified weapon. |= Description | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 23: | Line 23: | ||
|x1= <code> | |x1= Set player's handgun magazine ammo count to 10 rounds: | ||
</code>|= | <code>[[player]] [[setAmmo]] <nowiki>[</nowiki>[[handgunWeapon]] [[player]], 10];</code>|= EXAMPLE1 | ||
|x2= Set player's current weapon magazine ammo count to 1 round: | |||
<code>player [[setAmmo]] <nowiki>[</nowiki>[[currentWeapon]] [[player]], 1];</code>|= EXAMPLE2 | |||
|x3= If player is a gunner in a vehicle, set current weapon magazine ammo count to 5 rounds: | |||
<code>[[vehicle]] [[player]] [[setAmmo]] <nowiki>[</nowiki>[[currentWeapon]] [[vehicle]] [[player]], 5]; | |||
</code>|= EXAMPLE3 | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ |
Revision as of 10:46, 4 August 2013
Description
- Description:
- Set custom ammo count in the currently loaded magazine of the specified weapon.
- Groups:
- Uncategorised
Syntax
- Syntax:
- unit setAmmo [weapon, count]
- Parameters:
- unit: Object - Gunner or vehicle.
- [weapon, count]: Array
- weapon: String
- count: Number
- Return Value:
- Nothing
Examples
- Example 1:
- Set player's handgun magazine ammo count to 10 rounds:
player setAmmo [handgunWeapon player, 10];
- Example 2:
- Set player's current weapon magazine ammo count to 1 round:
player setAmmo [currentWeapon player, 1];
- Example 3:
- If player is a gunner in a vehicle, set current weapon magazine ammo count to 5 rounds:
vehicle player setAmmo [currentWeapon vehicle player, 5];
Additional Information
- See also:
- See also needed
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