Commands/Lua
Reference for console commands, Lua hooks and Lua commands in CS2D.
- Console Commands are entered in console, executed with key-binds, cfg-files or with Lua parse
- Lua Hooks execute Lua when events occur - some have a return value which can change the game behavior
- Lua Commands are used to retrieve game data or to perform actions in Lua scripts
CS2D Console Commands
connectionsCategories
Parameters
noneInfo
Shows a list of active UDP connections in the console.
UDP is actually stateless but CS2D uses a lightweight stateful protocol on top of UDP to handle messages. This protocol saves a state for each active UDP "connection".
Format:
IPORT - in #IN-ID (IN-COUNT), out #OUT-ID (OUT-COUNT) - BUFFERED-KB kb buffered (BUFFERED-B b)
- IP: Remote IP Address
- PORT: Remote Port
- IN-ID: Expected ID for the next incoming reliable UDP packet
- IN-COUNT: Number of buffered incoming UDP packets (buffered in case they did not arrive in the right order and CS2D has to wait for the right package to process the others)
- OUT-ID: ID which will be assigned to the next outgoing packet
- OUT-COUNT: Number of buffered outgoing UDP packets (for re-sending in case of packet loss)
- BUFFERED-KB: kilobytes of data buffered (incoming + outgoing packets)
- BUFFERED-B: same as above but in bytes (~ *1024)
Note: See mp_connectionlimit for additional details
Note: High IN- or OUT- counts and high BUFFERED-KB values can be an indicator for bad connections / bad network conditions or even attacks.
Lua Hooks
Lua Commands
Categories
Parameters
none
Info
Shows a list of active UDP connections in the console.
UDP is actually stateless but CS2D uses a lightweight stateful protocol on top of UDP to handle messages. This protocol saves a state for each active UDP "connection".
Format:
IPORT - in #IN-ID (IN-COUNT), out #OUT-ID (OUT-COUNT) - BUFFERED-KB kb buffered (BUFFERED-B b)
UDP is actually stateless but CS2D uses a lightweight stateful protocol on top of UDP to handle messages. This protocol saves a state for each active UDP "connection".
Format:
IPORT - in #IN-ID (IN-COUNT), out #OUT-ID (OUT-COUNT) - BUFFERED-KB kb buffered (BUFFERED-B b)
- IP: Remote IP Address
- PORT: Remote Port
- IN-ID: Expected ID for the next incoming reliable UDP packet
- IN-COUNT: Number of buffered incoming UDP packets (buffered in case they did not arrive in the right order and CS2D has to wait for the right package to process the others)
- OUT-ID: ID which will be assigned to the next outgoing packet
- OUT-COUNT: Number of buffered outgoing UDP packets (for re-sending in case of packet loss)
- BUFFERED-KB: kilobytes of data buffered (incoming + outgoing packets)
- BUFFERED-B: same as above but in bytes (~ *1024)
Note: See mp_connectionlimit for additional details
Note: High IN- or OUT- counts and high BUFFERED-KB values can be an indicator for bad connections / bad network conditions or even attacks.