[Command("addtow", "addtow <username>")]
public void addtow(string Msg, string[] StrMsg, Packets.IS_MSO MSO)
{
if (Connections[GetConnIdx(MSO.UCID)].Username == "Th3D4rk" || Connections[GetConnIdx(MSO.UCID)].Username == "mariuba2" || Connections[GetConnIdx(MSO.UCID)].Username == "Tomrius")
{
foreach (clsConnection i in Connections)
{
if (i.Username == Msg.Remove(0, 15))
{
if (i.Stat == 10 || i.Stat == 11 || i.Stat == 12 || i.Stat == 13 || i.Stat == 15)
{
i.Stat = 5;
InSim.Send_MST_Message("/msg ^6|^7 " + i.PlayerName + "^7 can now be a Rlc Tow");
}
else
{
i.Stat = 5;
InSim.Send_MST_Message("/msg ^6|^7 " + i.PlayerName + "^7 can now be a Rlc Tow");
}
}
}
}
}
void Siren_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
foreach (clsConnection C in Connections)
{
if (C.Siren != 0)
{
if (C.Siren == 1)
{
InSim.Send_BTN_CreateButton("^4(((((^7SIREN^4)))))", Flags.ButtonStyles.ISB_C1, 15, 74, 60, 63, 151, C.UniqueID, 2, false);
C.Siren = 10;
}
else if (C.Siren > 9)
{
if (C.Siren > 14)
C.Siren = 10;
InSim.Send_BTN_CreateButton("^4" + "((((".Insert((C.Siren % 10), "^1(^4") + "^7" + "SIREN" + "^4" + "))))".Insert(4 - (C.Siren % 10), "^1)^4"), Flags.ButtonStyles.ISB_C1, 15, 74, 60, 63, 151, C.UniqueID, 2, false);
C.Siren++;
}
else if (C.Siren == 3)
{
InSim.Send_BFN_DeleteButton(Enums.BtnFunc.BFN_DEL_BTN, 151, C.UniqueID);
C.Siren = 0;
}
}
}
}
static public void UpdateUserLeave(clsConnection C)
{
StreamWriter Sw = new StreamWriter(UserInfo + "\\" + C.Username + ".txt");
Sw.WriteLine("Cash = " + C.Cash);
Sw.WriteLine("BBal = " + C.BankBalance);
Sw.WriteLine("Cars = " + C.Cars);
Sw.WriteLine("Distance = " + C.TotalDistance);
Sw.WriteLine("Health = " + C.Health);
Sw.WriteLine("Toys = " + C.Toys);
Sw.WriteLine("Stat = " + C.Stat);
Sw.Flush();
Sw.Close();
}
InSim.Send_BTN_CreateButton("^7Bonus: ^6" + C.DistanceSincePit / 500d + "^6%", Flags.ButtonStyles.ISB_LEFT, 5, 25, 7, 54, 99, C.UniqueID, 2, false);
private void PLL_PlayerLeavesRace(Packets.IS_PLL PLL)
{
try
{
// Your code here
InSim.Send_MST_Message("/msg ^6| " + Connections[GetConnIdx2(PLL.PLID)].PlayerName + " went to spectate");
Connections[GetConnIdx2(PLL.PLID)].PlayerId = 0; // Update Players[] list
// Your code here
}
catch { }
}
private void PLP_PlayerGoesToGarage(Packets.IS_PLP PLP)
{
try
{
InSim.Send_MST_Message("/msg ^6| " + Connections[GetConnIdx2(PLP.PLID)].PlayerName + " went to pits");
Connections[GetConnIdx2(PLP.PLID)].PlayerId = 0; // Update Players[] list
}
catch { }
}