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



Introduced in

Version:2.11

Description

Description:Returns the number of bullets per burst, and whether the weapon has full-auto capability.

Syntax

Syntax:unit getWeaponMaxBurst type
Parameters:
  • unit: Object - Unit to check.
  • type: String - The type of weapon to inquire about. Can be:
    • "PRIMARY"
    • "SECONDARY"
    • "HANDGUN"
Return Value:Array - Contains [burst_count, full_auto]:
  • burst_count: Number - Number of bullets per burst (or 1 is no burst capability), as defined in the weapon burst parameter (see Weapon Configuration in the VBS Developer Reference).
  • full_auto: Number - Reload time (in sec), as defined in the weapon autoFire parameter (see Weapon Configuration in the VBS Developer Reference).

Returns nil, if the unit does not have the specified weapon type.

Examples

Examples:
_hasAuto = (player getWeaponMaxBurst "primary") select 1

Additional Information

See also: getMuzzleInfo
Multiplayer:
Problems:

Notes