Garry's Mod Wiki

Garry's Mod Wiki

  boolean WEAPON:CanPrimaryAttack()

Description

Helper function for checking for no ammo.

Returns

1 boolean
Can use primary attack

Example

As defined in weapon_base

function SWEP:CanPrimaryAttack() if ( self:Clip1() <= 0 ) then self:EmitSound( "Weapon_Pistol.Empty" ) self:SetNextPrimaryFire( CurTime() + 0.2 ) self:Reload() return false end return true end

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...