Player.DoAttackEvent

From GMod Wiki

Jump to: navigation, search
Function
Syntax Player.DoAttackEvent( )
Description:
Sends an attack animation event to a player.
Returns: nil
In Object: Player
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Player.DoAttackEvent]Player.DoAttackEvent [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionForces the player to play a third-person attacking animation when the player reloads the scripted weapon.
Used onNewerServer.png
Code
function SWEP:Reload()
 
	self.Owner:DoAttackEvent()
 
end
OutputWhen the player presses the button to reload, the third-person player model plays the default attacking animation.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox