Addon Details

Watch - Add Favorite


SAS_SwapInfo - query another server in game

posted on 2007-03-21 04:12:00
by Colster


This little scriptpack allows players to see what map and how many players are on another server from in game and then to switch to that server with just a chat command. Basically it creates a keygroup on each server that holds the current amount of live players and the current map, then using a scheduled task this is copied from one server to the other. Players on Server 1 can then say !s2 (for example) to see what's happening on server 2, then say !go if they want to switch to that one. For windows you need a scheduled task (or cron) running on your server that will move the saved result from one server to another. As an example this is the batch file from ours: [code] cd \ cd C:\SAS-Servers\SAS-Server1\dod\cfg\events\Server1 copy es_s1info_db.txt C:\SAS-Servers\SAS-Server2\dod\cfg\events\Server1 cd C:\SAS-Servers\SAS-Server2\dod\cfg\events\Server2 copy es_s2info_db.txt C:\SAS-Servers\SAS-Server1\dod\cfg\events\Server2 [/code] have this run every couple of minutes or for linux you can use symlinks to connect the folders dynamically. Then install the script on the other server and edit the files for your second server making all the s1 references s2 and vice versa. It uses [url=]SAS_Deny[/url] to check that players have cl_restrict_server_commands set to 0 as it couldn't redirect them if they don't