MarkMozza Posted May 20, 2020 Share Posted May 20, 2020 (edited) Rust Server Branch Switcher This script allows you to switch between branches using a single button. Support: https://discord.gg/RmMmh7K Installation 1. Create a new Custom Script. Script Engine: C# Event: Custom Icon Allow Scheduling: True Prompt for Variable Values: True Stop Service Before Executing: True Fill in remaining details 2. Copy the below code into the text area. using System; using System.IO; using TCAdmin; using System.Diagnostics; public class CSharpScript : CSharpScriptBase { public void Main() { Script.WriteToConsole("Updating Rust..."); Process process = new Process(); process.StartInfo.FileName = @TCAdminFolder+"\\Monitor\\Tools\\SteamCmd\\steamcmd.exe"; process.StartInfo.Arguments = "+login anonymous +app_info_update 1 +force_install_dir "+ThisService.RootDirectory+" +app_update 258550 "+ThisService.Variables["steambranch"]+" validate +quit"; process.StartInfo.UseShellExecute = false; process.StartInfo.RedirectStandardOutput = true; process.StartInfo.RedirectStandardError = true; process.OutputDataReceived += (s, e) => Script.WriteToConsole(e.Data); process.ErrorDataReceived += (s, e) => Script.WriteToConsole(e.Data); process.Start(); process.BeginOutputReadLine(); process.BeginErrorReadLine(); process.WaitForExit(); } } 3. Setup a New Variable. Variable Name: steambranch Item Type: Combobox Source Custom List Configure Items. Add the followering options... (valid from post date) First Item Value: LEAVE BLANK Display Text: Release Branch Second Item Value: -beta beta Display Text: Staging Branch Third Item Value: -beta aux01 Displau Text: AUX Branch 4. Save & Done! You're welcome Edited May 20, 2020 by MarkMozza 2 Link to comment Share on other sites More sharing options...
Alexr03 Posted May 20, 2020 Share Posted May 20, 2020 Good share! Link to comment Share on other sites More sharing options...
M0RG4N Posted May 20, 2020 Share Posted May 20, 2020 We'll be testing/using this :)! Thanks! Link to comment Share on other sites More sharing options...
MarkMozza Posted May 21, 2020 Author Share Posted May 21, 2020 (edited) Ill share all my scripts. Customers ask ill build and share here. I believe sharing code is the way to go with TCAdmin. Its not like a huge script thats doing something amazing. I feel like these features should be built in. PS. Just want to point out this adopted to be used on any Steam Game! Edited May 21, 2020 by MarkMozza PS Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now