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
closeplayersCategories
Parameters
- x
- y
- radius
- [team] (optional)
Info
Returns a list of all alive players (IDs) which are within the specified radius (in pixels) around the specified position (x|y) in pixels.
You can optionally specify a team to limit the search to players of that team:
- 0 - all teams (default)
- 1 - Ts only
- 2 - CTs only (including VIPs)
The players in the resulting list have no specific order.
The list may be empty in case no matching player was found.
Note: The position (x|y) and the radius are specified in PIXELS!
Note: If you only want to check if ANY player is within a radius you should use hascloseplayers instead (faster)!
Categories
Parameters
- x
- y
- radius
- [team] (optional)
Info
Returns a list of all alive players (IDs) which are within the specified radius (in pixels) around the specified position (x|y) in pixels.
You can optionally specify a team to limit the search to players of that team:
The players in the resulting list have no specific order.
The list may be empty in case no matching player was found.
You can optionally specify a team to limit the search to players of that team:
- 0 - all teams (default)
- 1 - Ts only
- 2 - CTs only (including VIPs)
The players in the resulting list have no specific order.
The list may be empty in case no matching player was found.
Note: The position (x|y) and the radius are specified in PIXELS!
Note: If you only want to check if ANY player is within a radius you should use hascloseplayers instead (faster)!