Shared definition of the cw_notepad entity of the Notepad plugin, with the networked bool that is true once the notepad has text.

Summary

Methods

Draw()client
Draws the notepad's model.
Explode()server
Plays the effect and sound of the notepad being destroyed.
Draws the notepad's name and whether it is written or blank when looked at.
Sets the clipboard model and physics and gives the notepad 25 health.
Subtracts the damage from the notepad's health and destroys it at 0.
Sets the notepad's text and marks it as written.
Sets up the networked bool 0 (note), which is true once the notepad has text.
Returns TRANSMIT_ALWAYS, so the notepad is networked to every client.

Methods

Draws the notepad's model.

Plays the effect and sound of the notepad being destroyed.

Draws the notepad's name and whether it is written or blank when looked at.

Parameters

  • x
  • y
  • alpha

Sets the clipboard model and physics and gives the notepad 25 health.

Subtracts the damage from the notepad's health and destroys it at 0.

Parameters

  • damageInfo

Sets the notepad's text and marks it as written.

The text's CRC becomes the notepad's uniqueID, which clients use to cache it. Does nothing when text is nil.

Parameters

  • text String The new text

Sets up the networked bool 0 (note), which is true once the notepad has text.

Returns TRANSMIT_ALWAYS, so the notepad is networked to every client.

Returns

  • Number TRANSMIT_ALWAYS

Defined in