Page tree
Skip to end of metadata
Go to start of metadata


Introduced in

Version:1.00

Description

Description:Sets the relative ammunition level (compared to a full state) for a vehicle or unit.

When setting the ammunition level to 1, the different VBS builds behave differently: In V1.x, no depleted magazines are added (only the current one is filled up), in V2.x, magazines are added until the initial level is reached.

If a vehicle has multiple turrets or weapons, then the command is applied to all of them. Once the level is set to 0, it cannot be filled up again (either by setting the level to 1, or using an ammunition truck).

Syntax

Syntax:vehicle setVehicleAmmo value
Parameters:
  • vehicle: Object - Vehicle or unit.
  • value: Number - Relative ammunition range between 0 (empty) - 1 (full).
Return Value:Nothing

Examples

Examples:
player setVehicleAmmo 0;

Additional Information

See also: getVehicleAmmo, setAmmoCargo
Multiplayer:
Problems:

Notes