where do you put this for the rcon?
SuperNova
Member
24
Posted 14 hours ago
Here is an RCON script that works for us for now
import clr;
import System;
from System import String, Environment, PlatformID;
from System.IO import Directory, Path;
from System.Diagnostics import Process;
p = Process();
p.StartInfo.FileName=Path.Combine(Directory.GetCurrentDirectory(), "Tools\SourceRcon.exe");
p.StartInfo.Arguments=String.Format("{0} {1} \"{2}\" \"{3}\"", ThisService.IpAddress, ThisService.RConPort, ThisService.RConPassword, RConCommand);
p.StartInfo.WorkingDirectory=Path.Combine(Directory.GetCurrentDirectory(), "Tools");
p.StartInfo.UseShellExecute = False;
p.StartInfo.RedirectStandardOutput = True;
p.Start();
ReturnValue= p.StandardOutput.ReadToEnd();