So I’m having problems with FireAnimationEvent. I’ve made me weapon with the Half Life 2 SMG in mind, but have noticed that especially with the addition of hands, I get more freedom with CStrike weapons. The only problem is that right now the muzzle/tracer effects work perfectly, but when I switch to any CStrike weapon the muzzle just breaks completely and I haven’t found a way to fix, mainly because I’m unfamiliar with all the event codes accessible to fix my problem. Does anyone know what I can do to fix this? Code included below.
function SWEP:FireAnimationEvent( pos, ang, event, options ) if( event == 6001 ) then return true; end if( event == 21 or event == 22 ) then local effect = EffectData(); effect:SetOrigin( pos ); effect:SetAngles( ang ); effect:SetEntity( self ); effect:SetAttachment( 1 ); util.Effect( "blastermuzzle", effect ); return true; end end