点击图片可看到更多讯息
开始使用于
- 游戏:
- Arma 3
- 版本:
- 0.50
描述
- 描述:
- Sets custom ammo count in the currently loaded magazine of the specified weapon. The unit must be local to the computer where command is executed.
基本句法
- 句法:
- unit setAmmo [weapon, count]
- 参数:
- unit: Object - Gunner or vehicle.
- [weapon, count]: Array
- weapon: String
- count: Number
- 返回值:
- Nothing
范例
- 范例1:
- Set player's handgun magazine ammo count to 10 rounds:
player setAmmo [handgunWeapon player, 10];
- 范例2:
- Set player's current weapon magazine ammo count to 1 round:
player setAmmo [currentWeapon player, 1];
- 范例3:
- If player is a gunner in a vehicle, set current weapon magazine ammo count to 5 rounds:
if (local vehicle player) then { vehicle player setAmmo [currentWeapon vehicle player, 5]; } else { hint "Vehicle must be local to this machine for 'setAmmo' to work"; };
- 范例4:
- If you try to set more ammo than the magazine can hold, it will be clipped at default magazine capacity:
player setAmmo [primaryWeapon player, 1000000]; //full mag with default ammo count