Commands/Lua

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

CS2D Command CS2D Console Commands

Lua Hook Lua Hooks

Category: all (77)

Lua Hook connect

Categories

Parameters

  • id: player id

Info

When a player connects to the game server. This hook is only invoked in a later step of the connection process. Players which cancel the connection process early or which are instantly disconnected (e.g. because of bans, wrong passwords, wrong client version or other reasons) won't trigger this hook.

Hook execution order when a player connects/joins:


Note: This hook is also executed for bots. Since bots do not have a real connection process, it will be INSTANTLY followed by the join hook.

Attention: This hook is not triggered if the connection process is cancelled in early stages for any reason.

Attention: The player is not fully connected at that point. You should not try to display Lua images, message or other things at this point. Use the join hook instead if you want to show stuff to the new player.

Return Values

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

Lua Command Lua Commands