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
Lua Hooks
Lua Commands
Category: map (3)
freerectCategories
Parameters
- x
- y
- width
- height
- mode
Info
Checks if the given rectangle starting at x|y and with the given width and height (all in pixel coordinates) is free. Returns true if free (depending on mode) or false otherwise.
Modes:
- 0: Walkable? Checks if all tiles are walkable (no wall, no obstacle, not deadly)
- 1: Free sight / shootable? Checks if there's anything in the rectangle which would block shooting (walls).
- 2: Shootable (like 1)? But also check for Terrorist players and hostages.
- 3: Shootable (like 2)? But also check for Counter-Terrorist/VIP players and hostages.
Categories
Parameters
- x
- y
- width
- height
- mode
Info
Checks if the given rectangle starting at x|y and with the given width and height (all in pixel coordinates) is free. Returns true if free (depending on mode) or false otherwise.
Modes:
Modes:
- 0: Walkable? Checks if all tiles are walkable (no wall, no obstacle, not deadly)
- 1: Free sight / shootable? Checks if there's anything in the rectangle which would block shooting (walls).
- 2: Shootable (like 1)? But also check for Terrorist players and hostages.
- 3: Shootable (like 2)? But also check for Counter-Terrorist/VIP players and hostages.