Garry's Mod Wiki

Revision Difference

WEAPON:Ammo1#512096

<function name="Ammo1" parent="WEAPON" type="hook">⤶ <ishook>yes</ishook>⤶ <description>Returns how much of primary ammo the player has.</description>⤶ <realm>Shared</realm>⤶ <rets>⤶ <ret name="" type="number">The amount of primary ammo player has</ret>⤶ </rets>⤶ </function>⤶ ⤶ <example>⤶ <description>As defined in weapon_base</description>⤶ <code>⤶ function SWEP:Ammo1()⤶ return self.Owner:GetAmmoCount( self.Weapon:GetPrimaryAmmoType() )⤶ end⤶ </code>⤶ ⤶ </example>