Commands/Lua

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

CS2D Command CS2D Console Commands

Lua Hook Lua Hooks

Category: all (79)

Lua Hook disconnect

Categories

Parameters

  • id: player id
  • reason: reason id (0 normal, >0 kick/ban/timeout)

Info

Executed when a player disconnects from the server. The player data is already fully removed when this hook is executed.

ID is the former ID of the player that left. Therefore it can't be used with player anymore.
Reason is a value which described why the player disconnected. See leave for a full list.

Note: This hook is executed AFTER leave with the very same parameters. When this hook is executed the player data is already fully removed. If you want to access any player data use leave instead!

Return Values

none - related action(s) [if there are any] performed by CS2D cannot be altered/omitted

Lua Command Lua Commands