Commands/Lua

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

CS2D Command CS2D Console Commands

Lua Hook Lua Hooks

Category: player (50)

Lua Hook leave

Categories

Parameters

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

Info

Whenever a player leaves the game. Either manually by disconnecting or forced by server (kick/ban).

Possible reason IDs:
  • 0 - normal leave (player left game manually)

  • 1 - ping timeout

  • 2 - kicked (without reason text)

  • 3 - cheat detected

  • 4 - server shutdown

  • 5 - client confirmed server shutdown (each client sends this when the server is being shut down)

  • 6 - banned

  • 7 - error during join process

  • 8 - client failed to load map

  • 9 - join process cancelled by user

  • 10 - ping too high (mp_pinglimit)

  • 11 - kicked for too many team kills (mp_teamkillpenalty)

  • 12 - kicked for too many hostage kills (mp_hostagepenalty)

  • 13 - kicked via voting of other players (mp_kickpercent, vote)

  • 14 - kicked for reservation system (mp_reservations)

  • 15 - speedhack detected

  • 16 - kicked (with reason text)

  • 17 - player has been rerouted to another server (reroute)

  • 18 - kicked for being idle (mp_idletime, mp_idlekick, mp_idleaction)

  • 19 - kicked for flooding chat with messages

Return Values

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

Lua Command Lua Commands