-
Notifications
You must be signed in to change notification settings - Fork 0
Quick Commands
This guide explains how to add your own custom quick commands to the CS2 Server Manager. Quick commands are predefined RCON commands that can be executed with a single button click on the web interface.
-
Open the
cs2manager.js
FileLocate the
cs2manager.js
file in the project directory. This is the main server-side script that defines the application behavior. -
Find the Quick Commands Section
In the
app.get('/')
route handler, look for the section that defines the Quick Commands form. It will look something like this:<form action="/send-command" method="POST"> <h3>Quick Commands</h3> <button type="submit" name="command" value="mp_restartgame 1">Restart Game</button> </form>
-
Add Your Custom Command
To add a new quick command, insert an additional
<button>
element inside the<form>
block. For example, to add a command that changes the server time limit, add the following:<button type="submit" name="command" value="mp_timelimit 30">Set Time Limit to 30</button>
Replace
mp_timelimit 30
with the desired RCON command and update the button text to match the command's purpose. -
Save and Restart the Server
After modifying the file, save your changes and restart the server to apply them.
<form action="/send-command" method="POST">
<h3>Quick Commands</h3>
<button type="submit" name="command" value="mp_restartgame 1">Restart Game</button>
<button type="submit" name="command" value="mp_timelimit 30">Set Time Limit to 30</button>
<button type="submit" name="command" value="mp_maxplayers 16">Set Max Players to 16</button>
</form>