cw_belongings entity
Entity defined in core/entities/entities/cw_belongings
Summary
Methods
Draw()client
Draws the belongings model.
Explode(scale)server
Plays a glass impact effect and a soft impact sound at the entity's position.
Draws the belongings title and the hint for opening them when the entity is looked at.
Initialize()server
Sets up physics, simple use and 50 health for the belongings.
OnRemove()server
Drops the stored items and cash into the world, unless the server is shutting down.
OnTakeDamage(damageInfo)server
Subtracts the damage from the belongings' health and destroys them at zero health.
SetData(inventory, cash)server
Sets the suitcase model and stores the inventory and cash the belongings hold.
UpdateTransmitState()server
Always transmits the belongings to every client.
Methods
Draws the belongings model.
ENT:Explode(scale)
server gamemodes/catwork/gamemode/core/entities/entities/cw_belongings/init.lua:46Plays a glass impact effect and a soft impact sound at the entity's position.
Parameters
- scale Number optional, defaults to
nilUnused; the effect scale is always 8
ENT:HUDPaintTargetID(x, y, alpha)
client gamemodes/catwork/gamemode/core/entities/entities/cw_belongings/cl_init.lua:7Draws the belongings title and the hint for opening them when the entity is looked at.
Parameters
- x
- y
- alpha
Sets up physics, simple use and 50 health for the belongings.
Drops the stored items and cash into the world, unless the server is shutting down.
ENT:OnTakeDamage(damageInfo)
server gamemodes/catwork/gamemode/core/entities/entities/cw_belongings/init.lua:57Subtracts the damage from the belongings' health and destroys them at zero health.
Parameters
- damageInfo
ENT:SetData(inventory, cash)
server gamemodes/catwork/gamemode/core/entities/entities/cw_belongings/init.lua:38Sets the suitcase model and stores the inventory and cash the belongings hold.
The contents are dropped into the world when the entity is removed (see ENT:OnRemove).
Parameters
- inventory Inventory The items to keep in the belongings
- cash Number The amount of cash to keep in the belongings
ENT:UpdateTransmitState()
server gamemodes/catwork/gamemode/core/entities/entities/cw_belongings/init.lua:29Always transmits the belongings to every client.