Defines the cw_stunstick weapon, the Civil Protection stun baton.

Primary fire strikes a player or prop within 96 units for club damage that scales with the owner's strength attribute and runs the PlayerStunEntity hook. Secondary fire knocks on a door (PlayerCanKnockOnDoor, PlayerKnockOnDoor) or pushes whatever is aimed at. The client draws a pulsing glow on the baton while it is raised.

Summary

Methods

Deploy()shared
Plays the draw animation.
Plays the owner's attack animation unless idle is set.
Plays the swing animation with a spark, flesh hit or impact sound and the stunstick impact effect.
Draws the stunstick with a pulsing glow at its tip while raised.
Plays the holster animation.
Sets the melee hold type.
Plays a spark sound and, for Civil Protection models, the baton deactivation animation.
Plays a spark sound and, for Civil Protection models, the baton activation animation.
Plays the door knock sound, mirrored to the owner's client when called on the server.
Plays the push sound, mirrored to the owner's client when called on the server.
Strikes whatever the owner aims at within 96 units.
Knocks on a door within 64 units or pushes the player, NPC or prop being aimed at within 96 units.
Draws the pulsing glow and spark sprites on the view model while raised.

Methods

Plays the draw animation.

Returns

  • Boolean Always true to allow the deploy

Plays the owner's attack animation unless idle is set.

Parameters

  • idle Boolean optional, defaults to nil Whether to skip the attack animation

Plays the swing animation with a spark, flesh hit or impact sound and the stunstick impact effect.

The effect and hit sounds only play when the owner's eye trace hits something within 96 units; otherwise a swing sound plays.

Draws the stunstick with a pulsing glow at its tip while raised.

Plays the holster animation.

Parameters

  • switchingTo

Returns

  • Boolean Always true to allow the holster

Sets the melee hold type.

Plays a spark sound and, for Civil Protection models, the baton deactivation animation.

Plays a spark sound and, for Civil Protection models, the baton activation animation.

Plays the door knock sound, mirrored to the owner's client when called on the server.

Plays the push sound, mirrored to the owner's client when called on the server.

Strikes whatever the owner aims at within 96 units.

Players are pushed back and, while above 10 health, take club damage that scales with the owner's strength. Physics props are pushed and take more damage; ragdolled players take the player damage. Fires the PlayerStunEntity hook for every hit.

Knocks on a door within 64 units or pushes the player, NPC or prop being aimed at within 96 units.

Knocking needs the PlayerCanKnockOnDoor hook to allow it and fires PlayerKnockOnDoor. Pushing plays the Civil Protection push animation for those models.

Draws the pulsing glow and spark sprites on the view model while raised.

Defined in