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
rconCategories
Parameters
- commands (text): one ore more commands
Info
Short for remote control. Executes commands on a server. You have to use rcon_pw first.
ALL commands can be used with rcon!
Attention: WARNING: EVERYTHING behind rcon in the same line will be sent to server. No matter how many quotes or semicolons it contains.
for example:
rcon sv_fow 0; say "fog disabled"
this will send
sv_fow 0; say "fog disabled"
to the server and NOT just
sv_fow 0
RCon Usage Steps
- setup a server with an rcon password using sv_rcon mypw in its sys/server.cfg ("mypw" is used as rcon password in this example)
- connect to this server
- enter rcon_pw mypw in the console AFTER connecting
- now you can enter rcon COMMANDS as many times as you want. COMMANDS can be one or more CS2D command(s). e.g. rcon sv_msg "Hi the admin is in the house!"
Lua Hooks
Lua Commands
Categories
Parameters
- commands (text): one ore more commands
Info
Short for remote control. Executes commands on a server. You have to use rcon_pw first.
ALL commands can be used with rcon!
for example:
rcon sv_fow 0; say "fog disabled"
this will send
sv_fow 0; say "fog disabled"
to the server and NOT just
sv_fow 0
RCon Usage Steps
ALL commands can be used with rcon!
Attention: WARNING: EVERYTHING behind rcon in the same line will be sent to server. No matter how many quotes or semicolons it contains.
for example:
rcon sv_fow 0; say "fog disabled"
this will send
sv_fow 0; say "fog disabled"
to the server and NOT just
sv_fow 0
RCon Usage Steps
- setup a server with an rcon password using sv_rcon mypw in its sys/server.cfg ("mypw" is used as rcon password in this example)
- connect to this server
- enter rcon_pw mypw in the console AFTER connecting
- now you can enter rcon COMMANDS as many times as you want. COMMANDS can be one or more CS2D command(s). e.g. rcon sv_msg "Hi the admin is in the house!"