Player GetWeaponState

Returns a table with data about the current state of the currently equipped weapon
;Usage
{Ammo, AmmoType, Clip, FireRateMod, [Zoom, ZoomedIn]} = Player.GetWeaponState([main])
Ammo - number of rounds in storage (not counting rounds in magazine)
AmmoType - seems to be projectile type
Charge - number
ChargeRate - number
Clip - number of rounds currently in magazine
FireRateMod - seems to show modified firerate, but doesn't quite match up. is normally 1, but for my shotgun with 7.5% fire rate bonus, it's 1.10....
Locked - boolean
MaxZoom - number
MinZoom - number
RoundsPerBurst - number
ZoomedIn - boolean, whether one is zoomed in or not
ZoomPercent - number
;Returns table with following values:
Value 	Type 	Description
Ammo 	number 	number of rounds in storage (not counting rounds in magazine)
AmmoType 	string 	seems to be projectile type
Charge 	number 	numeric representation of current state of charge. Seems to be for the HMG only. Goes from 0 to 1.
ChargeRate 	number 	???
Clip 	number 	number of rounds currently in magazine
FireRateMod 	number 	seems to show modified firerate, but doesn't appear to match up to in-game descriptions
Locked 	boolean	seems indicate when movement is locked due to weapon, IE when in Turret Mode as a dreadnaught
MaxZoom 	number 	maximum zoom allowed when aiming down sight. Equal to MinZoom for weapons that have static zoom levels (IE assault rifles)
MinZoom 	number 	minimum zoom allowed when aiming down sight.
RoundsPerBurst	number 	unclear. is 1 for shotguns, so clearly not number of projectiles fired.
ZoomedIn 	boolean	whether one is zoomed in or not
ZoomPercent 	number 	Not exactly a percent! For weapons that have 1 zoom level, this always returns 1 (if zoomed in). For weapons that have variable zoom levels, it's 0 for minimum zoom, 1 for maximum zoom, and a number between them relative to current zoom level. So, a weapon with 3 zoom levels (min, mid way, and max), being at mid zoom would return 0.5
;Examples:
<nowiki>
--[[
{
"RoundsPerBurst" = 1,
"AmmoType" = "BioCrossbow Bolt",
"Locked" = false,
"Ammo" = 100,
"Clip" = 21,
"FireRateMod" = 1
}
--]]
</nowiki>
Category:Addon_API