<?php
// Form load
System.Timers.Timer BackUp = new System.Timers.Timer(1);
void BackUp_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
foreach (clsConnection C in Connections)
FileInfo.UpdateUserLeave(C.Username, C.Cash, C.Cars);
}
?>
<?php
private void MCI(Packets.IS_MCI MCI)
{
for (int i = 0; i < Players.Count; i++)
{
decimal Speed = (decimal)((MCI.Info[i].Speed * (100f / 32768f)) * 3.6f);
decimal ConvSpeed = (decimal)(Speed * 25 / 1000);
Players[GetPlyIdx(MCI.Info[i].PLID)].Payout += ConvSpeed;
}
}
}
}
?>
<?php
// Form load
private void Form1_Load(object sender, EventArgs e)
{
try
{
PayUser.Enabled = true;
PayUser.Elapsed += new System.Timers.ElapsedEventHandler(PayUser_Elapsed);
if (System.IO.Directory.Exists(UserInfo) == false) System.IO.Directory.CreateDirectory(UserInfo);
// Connect to InSim
cfg = new ConnectionSettings("127.0.0.1", 29999, 0, Flags.InSimFlags.ISF_MCI, '!', 1000, "*****", "^3French Cruise");
InSim = new InSimInterface(cfg);
InSim.Connect();BackUp.Enabled = true;
BackUp.Elapsed += new System.Timers.ElapsedEventHandler(BackUp_Elapsed);
?>
<?php
System.Timers.Timer BackUp = new System.Timers.Timer(300000);
void BackUp_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
foreach (clsConnection C in Connections)
FileInfo.UpdateUserLeave(C.Username, C.Cash, C.Cars);
}
?>
<?php
case "!tow":
InSim.Send_MTC_MessageToConnection("^7your tow will arrive soon " + Connections[GetConnIdx(MSO.UCID)].pit, MSO.UCID, 0);
Connections[GetConnIdx(MSO.UCID)].Cash -= 500;
break;
?>