武装突袭 Wiki
Advertisement
Introduced with Arma 3 version 0.50
  Arguments of this scripting command have to be local to the client the command is executed onEffects of this scripting command are broadcasted over the network and happen on every computer in the network

点击图片可看到更多讯息

开始使用于

游戏:
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

额外资讯

多人游戏:
-
也可以看看:
ammosetFuelsetHit

注意事项

此处撰写句法皆为可行用法. 可到官网[1]专页回报错误. 你可以使用讨论页面或是论坛来进行讨论.
新增注意事项 | 如何新增?

Notes

Bottom Section

Advertisement