Reference for console commands, Lua hooks and Lua commands in CS2D.

CS2D Command CS2D Console Commands

Lua Hook Lua Hooks

Category: player (46)

Lua Hook die



  • victim: player id
  • killer: player id
  • weapon: weapon type id
  • x: death x (pixels)
  • y: death y (pixels)
  • killer object id: id of dynamic object that killed (or 0 if not killed by object)


When a player dies.
killer is the player ID of the player who performed the kill (can also be 0 if the death was not caused by another player). victim is the ID of the player who died. x and y define the position of this death on the map in pixels.

weapon can be a weapon type ID or a special source ID.

Weapon and item type IDs:

Special source IDs:

Note: The kill hook works nearly the same but is only called when a death is caused by another player.
Note: This hook allows you to avoid that the killed player drops weapons/items by returning 1 (not possible with the kill hook)!

Return Values

  • 0: proceed normally (and drop stuff depending on settings)
  • 1: drop bomb/flag only (all other carried items will get lost)

Lua Command Lua Commands