update arms race

This commit is contained in:
shoopea
2024-11-16 18:27:47 +01:00
parent 6490b99fd6
commit 347e925af7
3 changed files with 6 additions and 4 deletions

View File

@@ -59,9 +59,6 @@ router.post('/api/setup-game', is_authenticated, async (req, res) => {
await rcon.execute_command(server_id, `game_mode 0`);
await rcon.execute_command(server_id, `sv_skirmish_id 10`);
execute_cfg_on_server(server_id, './cfg/live_arms_race.cfg');
setTimeout(() => {
rcon.execute_command(server_id, `mp_restartgame 1`);
}, 20000)
}
await rcon.execute_command(server_id, `changelevel ${map}`);
@@ -75,6 +72,10 @@ router.post('/api/setup-game', is_authenticated, async (req, res) => {
setTimeout(() => {
execute_cfg_on_server(server_id, './cfg/warmup_24.cfg');
}, 1000)
} else if (game == "6") {
setTimeout(() => {
rcon.execute_command(server_id, `mp_restartgame 20`);
}, 1000)
}
return res.status(200).json({ message: 'Game Created!' });