Player GetWeaponInfo

Returns information on the player's currently equipped weapon.
;Usage
{WeaponName, WeaponType, AmmoPerBurst, BurstDuration, RateOfFire, ClipSize, MaxAmmo, Range[, MaxZoom, UnderbarrelId, AttackAbility, BurstAbility]} = Player.GetWeaponInfo([main])
;Returns a table with the following keys:
Value 	Type 	Description
AmmoPerBurst 	number 	not sure what this is, always seems to be 1 (EX: shotguns still have this as 1)
BurstDuration	number 	not sure what this is, always seems to be 0
ChargeType 	string 	"spinup" when an HMG, otherwise nil
ChargeUpTime 	number 	spinuptime for HMGs. is 1.50... for HMGs, otherwise 0.
ClipSize 	number 	maximum number of rounds in a magazine
ItemId 	{entity}	debug output shows this as type {entity}, but Lua treats is as type User Data, which means it's defined in C
MaxAmmo 	number 	this + ClipSize is total amount of ammo storable (EX: for HMGs without clip mods, would be 650)
MaxZoom 	number 	zoom factor, defined for weapons that can ADS, otherwise nil. 60 for Supressor Rifle, 55 for Assault Rifles, 50 for Marksman Rifles, 22 for sniper rifles
Range 	number 	in meters
RateOfFire 	number 	in rounds/second
WeaponType 	string 	string representation of currently equipped weapon type. EX: "Heavy MG" (all variants of the same type have same WeaponType, so Spinup HMGs and ReflectShield HMGs are just "Heavy MG")
;Examples:
<nowiki>
--[[
{
"ReticleType" = "PLASMA_CANNON",
"RateOfFire" = 1.25,
"Range" = 215,
"MaxAmmo" = 32,
"UnderbarrelId" = <30720>,
"BurstDuration" = 0,
"AmmoPerBurst" = 1,
"ClipSize" = 9,
"WeaponType" = "Fusion Cannon",
"ItemId" = <84958>
}
--]]
</nowiki>
Category:Addon_API