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

CS2D Command CS2D Console Commands

Lua Hook Lua Hooks

Lua Command Lua Commands

Lua Command reqcld



  • id
  • mode
  • [parameter] (optional)


reqcld is short for "request client data". This command request data from a player client (id=player id) or from all clients (id=0).

Mode specifies which data you will receive:

  • Mode 0: Cursor position (cursor position on screen, scaled based on mp_hudscale)
  • Mode 1: Map scrolling
  • Mode 2: Absolute cursor position (cursor position on map, NOT influenced by mp_hudscale)
  • Mode 3: 1 if the client has the advanced light engine enabled, 0 otherwise (second value always 0)
  • Mode 4: 1 if the file specified with parameter (file path relative to the CS2D folder) has been loaded, 0 otherwise; checksum of the file (only if the file is under gfx/ or sfx/) as provided by checksumfile()
  • Mode 5: Mod info
  • Mode 6: 1 if the client has 3D rendering (render3d) enabled, 0 otherwise (second value always 0)

The last parameter is not required for all modes. For some modes (mode 4) it is crucial though. Please read the descriptions of the modes to learn when and how it is used.

The requested data will be received later (delayed because it will be sent over the net connection obviously). You have to use the clientdata-hook to handle the incoming data!

Note: Requested data is guaranteed to arrive (unless the client is unreachable).
Note: The last parameter is optional and only required/used by some of the modes.
Attention: This command uses reliable UDP packets. Using it too frequently might lead to lags or ping spikes!
Attention: Don't forget that the values sent by the client might be manipulated by hacks or other software. You can't trust them 100%!