From Garry's Mod
Revision as of 17:15, 30 November 2019 by Code gs
Called when the weapon entity is created.
Issue Tracker: #2732
This is not called serverside after a quicksave.
Issue Tracker: #3015
Sets the weapon hold type to SWEP.HoldType.
function SWEP:Initialize() self:SetHoldType( self.HoldType ) end
Fixes the function not being called clientside.
function SWEP:Initialize() self.m_bInitialized = true -- Other code end function SWEP:Think() if (not self.m_bInitialized) then self:Initialize() end -- Other code end