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
banipCategories
Parameters
- ip (text): IP address
- [duration] (-1 - 1440)(optional): Temporary ban duration in minutes (or 0 for infinite ban, or -1 for default temp ban time mp_tempbantime)
- [reason] (text)(optional): A ban reason (optional)
Info
Bans an IP address. Players with this IP will not be able to join anymore.
This command supports wildcards (*). The address does always have to have 3 dots even when using wildcards. Some examples:
123.*.*.* = ban every ip starting with 123
*.*.*.123 = ban every ip ending with 123
*.123.234.* = ban every ip with 123.234 in the middle
The following ban addresses are NOT supported! Do NOT use comparable bans:
123.* = not enough dots
*.123.234 = not enough dots
12*.*.* = mixed digits and * (12*) are not supported
You can also specify a duration if you want the ban to be temporary only. Use -1 if you want to use the value of mp_tempbantime as duration or use a value >0 to specify the ban duration in minutes. 0 means that the ban will be infinite (default).
Use reason to specify a ban reason. This will be displayed when affected players are removed from the server or when they try to join.
Lua Hooks
Lua Commands
Categories
Parameters
- ip (text): IP address
- [duration] (-1 - 1440)(optional): Temporary ban duration in minutes (or 0 for infinite ban, or -1 for default temp ban time mp_tempbantime)
- [reason] (text)(optional): A ban reason (optional)
Info
Bans an IP address. Players with this IP will not be able to join anymore.
This command supports wildcards (*). The address does always have to have 3 dots even when using wildcards. Some examples:
123.*.*.* = ban every ip starting with 123
*.*.*.123 = ban every ip ending with 123
*.123.234.* = ban every ip with 123.234 in the middle
The following ban addresses are NOT supported! Do NOT use comparable bans:
123.* = not enough dots
*.123.234 = not enough dots
12*.*.* = mixed digits and * (12*) are not supported
You can also specify a duration if you want the ban to be temporary only. Use -1 if you want to use the value of mp_tempbantime as duration or use a value >0 to specify the ban duration in minutes. 0 means that the ban will be infinite (default).
Use reason to specify a ban reason. This will be displayed when affected players are removed from the server or when they try to join.
This command supports wildcards (*). The address does always have to have 3 dots even when using wildcards. Some examples:
123.*.*.* = ban every ip starting with 123
*.*.*.123 = ban every ip ending with 123
*.123.234.* = ban every ip with 123.234 in the middle
The following ban addresses are NOT supported! Do NOT use comparable bans:
123.* = not enough dots
*.123.234 = not enough dots
12*.*.* = mixed digits and * (12*) are not supported
You can also specify a duration if you want the ban to be temporary only. Use -1 if you want to use the value of mp_tempbantime as duration or use a value >0 to specify the ban duration in minutes. 0 means that the ban will be infinite (default).
Use reason to specify a ban reason. This will be displayed when affected players are removed from the server or when they try to join.