void MsgBox(string MsgStr)
{
try
{
textBox1.Text += " [" + System.DateTime.Now.Hour + ":" + System.DateTime.Now.Minute + "] " + MsgStr + "\r\n";
}
catch { }
}
string Msg = MSO.Msg.Substring(MSO.TextStart, (MSO.Msg.Length - MSO.TextStart));
string[] StrMsg = Msg.Split(' ');
#region ' Box Remove Colors String '
string boxy;
boxy = MSO.Msg;
if (boxy.Contains("^0"))
{
boxy = boxy.Replace("^0", "");
}
if (boxy.Contains("^1"))
{
boxy = boxy.Replace("^1", "");
}
if (boxy.Contains("^2"))
{
boxy = boxy.Replace("^2", "");
}
if (boxy.Contains("^3"))
{
boxy = boxy.Replace("^3", "");
}
if (boxy.Contains("^4"))
{
boxy = boxy.Replace("^4", "");
}
if (boxy.Contains("^5"))
{
boxy = boxy.Replace("^5", "");
}
if (boxy.Contains("^6"))
{
boxy = boxy.Replace("^6", "");
}
if (boxy.Contains("^7"))
{
boxy = boxy.Replace("^7", "");
}
if (boxy.Contains("^8"))
{
boxy = boxy.Replace("^8", "");
}
if (boxy.Contains("| "))
{
boxy = boxy.Replace("| ", "");
}
MsgBox(boxy);
#endregion
clsConn Conn = new clsConn();
var mph = car.Speed / 146;
Conn.InPlace1Dist = ((int)Math.Sqrt(Math.Pow(car.X - (- 102 * 196608), 2) + Math.Pow(car.Y - (-42 * 196608), 2)) / 65536);
if (Conn.InPlace1Dist <= 4 && (mph <= 4))
{
insim.Send(new IS_BTN {Text = "^7Welcome", BStyle = ButtonStyles.ISB_DARK, H = 15, W = 109, T = 55, L = 46, ClickID = 10, UCID = 0, ReqI = 10});
}
foreach (CompCar car in MCI.Info)
{
if(car.X == -102 | car.Y == -42)
{
insim.Send("/msg Hello");
}
}
using System.Diagnostics;
Process.Start("link");
private void ButtonClicked(InSim insim, IS_BTC BTC)
{
try
{
insim.Send(new IS_BTC { Text = "Test", BStyle = ButtonStyles.ISB_CLICK | ButtonStyles.ISB_LIGHT, UCID = 0, H = 6, W = 30, T = 30, L = 80, ClickID = 6, ReqI = 6});
if(BTC.ClickID == 6)
{
insim.Send(UCID, 0, "abc123");
}
}
catch { }
}