Shared definition of the cw_cash entity: a non-spawnable anim entity named Cash with a networked Amount integer.

Summary

Methods

Draw()client
Draws the cash model unless the CashEntityDraw hook returns false.
Explode()server
Plays a glass impact effect and a soft impact sound at the entity's position.
Draws the cash name and the formatted amount when the cash is looked at.
Sets the cash model from the model_cash option and sets up debris physics, simple use and 25 health.
Subtracts the damage from the cash entity's health and destroys it at zero health.
Sets the amount of cash the entity holds and networks it to clients.
Sets up the networked Amount integer holding the cash amount.
Think()server
Removes the cash once a second check finds it outside the world.
Always transmits the cash entity to every client.

Methods

Draws the cash model unless the CashEntityDraw hook returns false.

Plays a glass impact effect and a soft impact sound at the entity's position.

Draws the cash name and the formatted amount when the cash is looked at.

Parameters

  • x
  • y
  • alpha

Sets the cash model from the model_cash option and sets up debris physics, simple use and 25 health.

Subtracts the damage from the cash entity's health and destroys it at zero health.

Parameters

  • damageInfo

Sets the amount of cash the entity holds and networks it to clients.

Parameters

  • amount Number The cash amount

Sets up the networked Amount integer holding the cash amount.

Removes the cash once a second check finds it outside the world.

Always transmits the cash entity to every client.

Defined in