Weapon.SetClip2

From GMod Wiki

Jump to: navigation, search


Function
Syntax Weapon:SetClip2( Integer bullets )
Description:
Sets the number of bullets in the secondary clip.
Returns: nil
In Object: Weapon
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Weapon.SetClip2]Weapon.SetClip2 [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionQuick way to remove a bullet from your clip after firing.
Used onNewerShared.png
Code
function SWEP:SecondaryAttack()
     // Fire code goes here
     self:SetClip2( self:Clip2() - 1 ) // Remove 1 bullet
end
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox