UPDATE
This commit is contained in:
parent
3402d770f7
commit
6490b99fd6
@ -27,31 +27,37 @@ router.post('/api/setup-game', is_authenticated, async (req, res) => {
|
|||||||
if (game == "1") { // Competitive Short
|
if (game == "1") { // Competitive Short
|
||||||
await rcon.execute_command(server_id, `game_type 0`);
|
await rcon.execute_command(server_id, `game_type 0`);
|
||||||
await rcon.execute_command(server_id, `game_mode 1`);
|
await rcon.execute_command(server_id, `game_mode 1`);
|
||||||
|
await rcon.execute_command(server_id, `sv_skirmish_id 0`);
|
||||||
execute_cfg_on_server(server_id, './cfg/live_competitive_16.cfg');
|
execute_cfg_on_server(server_id, './cfg/live_competitive_16.cfg');
|
||||||
await rcon.execute_command(server_id, `mp_warmup_pausetimer 1`);
|
await rcon.execute_command(server_id, `mp_warmup_pausetimer 1`);
|
||||||
} else if (game == "2") { // Competitive Long
|
} else if (game == "2") { // Competitive Long
|
||||||
await rcon.execute_command(server_id, `game_type 0`);
|
await rcon.execute_command(server_id, `game_type 0`);
|
||||||
await rcon.execute_command(server_id, `game_mode 1`);
|
await rcon.execute_command(server_id, `game_mode 1`);
|
||||||
|
await rcon.execute_command(server_id, `sv_skirmish_id 0`);
|
||||||
execute_cfg_on_server(server_id, './cfg/live_competitive_24.cfg');
|
execute_cfg_on_server(server_id, './cfg/live_competitive_24.cfg');
|
||||||
await rcon.execute_command(server_id, `mp_warmup_pausetimer 1`);
|
await rcon.execute_command(server_id, `mp_warmup_pausetimer 1`);
|
||||||
} else if (game == "3") { // Casual Short
|
} else if (game == "3") { // Casual Short
|
||||||
await rcon.execute_command(server_id, `game_type 0`);
|
await rcon.execute_command(server_id, `game_type 0`);
|
||||||
await rcon.execute_command(server_id, `game_mode 0`);
|
await rcon.execute_command(server_id, `game_mode 0`);
|
||||||
|
await rcon.execute_command(server_id, `sv_skirmish_id 0`);
|
||||||
execute_cfg_on_server(server_id, './cfg/live_casual_16.cfg');
|
execute_cfg_on_server(server_id, './cfg/live_casual_16.cfg');
|
||||||
await rcon.execute_command(server_id, `mp_warmup_pausetimer 1`);
|
await rcon.execute_command(server_id, `mp_warmup_pausetimer 1`);
|
||||||
} else if (game == "4") { // Casual Long
|
} else if (game == "4") { // Casual Long
|
||||||
await rcon.execute_command(server_id, `game_type 0`);
|
await rcon.execute_command(server_id, `game_type 0`);
|
||||||
await rcon.execute_command(server_id, `game_mode 0`);
|
await rcon.execute_command(server_id, `game_mode 0`);
|
||||||
|
await rcon.execute_command(server_id, `sv_skirmish_id 0`);
|
||||||
execute_cfg_on_server(server_id, './cfg/live_casual_24.cfg');
|
execute_cfg_on_server(server_id, './cfg/live_casual_24.cfg');
|
||||||
await rcon.execute_command(server_id, `mp_warmup_pausetimer 1`);
|
await rcon.execute_command(server_id, `mp_warmup_pausetimer 1`);
|
||||||
} else if (game == "5") { // Wingman
|
} else if (game == "5") { // Wingman
|
||||||
await rcon.execute_command(server_id, `game_type 0`);
|
await rcon.execute_command(server_id, `game_type 0`);
|
||||||
await rcon.execute_command(server_id, `game_mode 2`);
|
await rcon.execute_command(server_id, `game_mode 2`);
|
||||||
|
await rcon.execute_command(server_id, `sv_skirmish_id 0`);
|
||||||
execute_cfg_on_server(server_id, './cfg/live_wingman.cfg');
|
execute_cfg_on_server(server_id, './cfg/live_wingman.cfg');
|
||||||
await rcon.execute_command(server_id, `mp_warmup_pausetimer 1`);
|
await rcon.execute_command(server_id, `mp_warmup_pausetimer 1`);
|
||||||
} else if (game == "6") { // Arms race
|
} else if (game == "6") { // Arms race
|
||||||
await rcon.execute_command(server_id, `game_type 1`);
|
await rcon.execute_command(server_id, `game_type 1`);
|
||||||
await rcon.execute_command(server_id, `game_mode 0`);
|
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');
|
execute_cfg_on_server(server_id, './cfg/live_arms_race.cfg');
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
rcon.execute_command(server_id, `mp_restartgame 1`);
|
rcon.execute_command(server_id, `mp_restartgame 1`);
|
||||||
|
Loading…
Reference in New Issue
Block a user