Weapon.SendWeaponAnim

From GMod Wiki

Jump to: navigation, search
Warning 64.pngThis page needs to be edited as it contains information that is unclear or incorrect. Improvement can be discussed on the talk page. Find more pages that need work here.
Details: None given.


Function
Syntax Weapon:SendWeaponAnim( Enum Act )
Description:
Defines the animation for a specific function.
Returns: nil
In Object: Weapon
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Weapon.SendWeaponAnim]Weapon.SendWeaponAnim [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThe animation for Firing.
Used onNewerShared.png
Code
function SWEP:PrimaryAttack()
 
  if ( !self:CanPrimaryAttack() ) then return end
 
  self:EmitSound("Weapon_Shotgun.Single")
 
  self:ShootBullet( 150, 9, 0.75 )
 
  self:TakePrimarymmo( 1 )
 
  self.Owner:ViewPunch( Angle( -1, 0, 0 ) )
 
  self:SendWeaponAnim( ACT_VM_PRIMARYATTACK )
 
 end 
OutputThe most basic attack.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox