<?php
case "!pmsg":
if (StrMsg.Length > 2)
{
string Message = Msg.Remove(0, 4 + StrMsg[1].Length);
bool SendComplete = false;
foreach (clsConnection Conn in Connections)
{
if (Conn.Username.ToUpper().Contains(StrMsg[1].ToUpper()))
{
if (Connections[GetConnIdx(MSO.UCID)].Username == StrMsg[1])
{
InSim.Send_MTC_MessageToConnection("^3>^7 You cant can send a pm to yourself!", MSO.UCID, 0);
}
else
{
SendComplete = true;
InSim.Send_MTC_MessageToConnection("Private Message :", MSO.UCID, 0);
InSim.Send_MTC_MessageToConnection("To " + Conn.PlayerName , MSO.UCID, 0);
InSim.Send_MTC_MessageToConnection("^7 " + Message, MSO.UCID, 0);
InSim.Send_MTC_MessageToConnection("Private Message :", Conn.UniqueID, 0);
InSim.Send_MTC_MessageToConnection("From " + Connections[GetConnIdx(MSO.UCID)].PlayerName, Conn.UniqueID, 0);
InSim.Send_MTC_MessageToConnection("^^7 " + Message, Conn.UniqueID, 0);
}
}
}
}
else
{
InSim.Send_MTC_MessageToConnection("^3>^7 Invalid message or username.", MSO.UCID, 0);
}
break;
?>
private void VER_InSimVersionInformation(Packets.IS_VER VER)
{
if (VER.Product == "S1")
{
Version = "S1";
}
if (VER.Product == "S2")
{
Version = "S2";
}
if (VER.Product == "Demo")
{
Version = "Demo";
}
}
main buffer:
string Version;
case "!track":
if ( Connections[GetConnIdx(MSO.UCID)].IsAdmin == 1)
{
try
{
if (StrMsg.Length > 0)
{
if (StrMsg[1].Contains("-"))
InSim.Send_MTC_MessageToConnection("^1InSim:^7 Unknown Command", MSO.UCID, 0);
else
{
InSim.Send_MST_Message("/msg ^6- ^7Changed the track to ^6- ^7" + (StrMsg[1]));
InSim.Send_MST_Message("/track " + (StrMsg[1]));
}
}
}
catch
{
InSim.Send_MTC_MessageToConnection("^1InSim:^7 Go to race menu!", MSO.UCID, 0);
break;
}
}
else InSim.Send_MTC_MessageToConnection("^1InSim:^7 Command not Authorized!", MSO.UCID, 0);
break;
/host=^3//!\\
/pass=lfs
/admin=**