Garry's Mod Wiki

Revision Difference

WEAPON:ShootEffects#512183

<function name="ShootEffects" parent="WEAPON" type="hook">⤶ <ishook>yes</ishook>⤶ <description>A convenience function to create shoot effects.</description>⤶ <realm>Shared</realm>⤶ </function>⤶ ⤶ <example>⤶ <description>As defined in weapon_base</description>⤶ <code>⤶ function SWEP:ShootEffects()⤶ ⤶ self.Weapon:SendWeaponAnim( ACT_VM_PRIMARYATTACK ) -- View model animation⤶ self.Owner:MuzzleFlash() -- Crappy muzzle light⤶ self.Owner:SetAnimation( PLAYER_ATTACK1 ) -- 3rd Person Animation⤶ ⤶ end⤶ </code>⤶ ⤶ </example>