Garry's Mod Wiki

WEAPON:CanPrimaryAttack

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.Weapon:Clip1() <= 0 ) then self:EmitSound( "Weapon_Pistol.Empty" ) self:SetNextPrimaryFire( CurTime() + 0.2 ) self:Reload() return false end return true end

Page Links


Special Pages


Wikis

?

Render Time: 63ms

DB GetPage 38
Generate Html 2
SaveChanges (1) 8
Render Body 0
Render Sidebar 12