case "!lockmember":
if (Connections[GetConnIdx(MSO.UCID)].Username == "username")
{
//int Username = int.Parse(StrMsg[1]);
foreach (clsConnection i in Connections)
{
if (i.Username == StrMsg[1])
{
if (i.Stat == 10 || i.Stat == 11 || i.Stat == 13 || i.Stat == 12)
{
i.Stat = 12;
InSim.Send_MST_Message("/msg ^6>^7 " + i.PlayerName + " can't now be a Member");
}
else
{
i.Stat = 2;
InSim.Send_MST_Message("/msg ^6>^7 " + i.PlayerName + " can't now be a Member");
InSim.Send_MST_Message("/spec ^6>^7 " + Connections[GetConnIdx(MSO.UCID)].Username + " can't now be a Member");
}
}
}
}
break;
i.Stat = 12;
InSim.Send_MST_Message("/msg ^6>^7 " + i.PlayerName + " can't now be a Member");
}
else
{
i.Stat = 2;
case "!ticket":
if (Connections[GetConnIdx(MSO.UCID)].InLotto == 1 && Environment.TickCount - Connections[GetConnIdx(MSO.UCID)].LastLotto > 1296000) //3 hours
{
Connections[GetConnIdx(MSO.UCID)].Cash -= 50;
int prize = new Random().Next(0, 2000);
Connections[GetConnIdx(MSO.UCID)].Prize += prize;
Connections[GetConnIdx(MSO.UCID)].Cash += Connections[GetConnIdx(MSO.UCID)].Prize;
InSim.Send_MTC_MessageToConnection("^5>^7You have received ^2€" + Connections[GetConnIdx(MSO.UCID)].Prize + " ^7from Lotto", MSO.UCID, 0);
Connections[GetConnIdx(MSO.UCID)].LastLotto = Environment.TickCount;
}
else if (Environment.TickCount - Connections[GetConnIdx(MSO.UCID)].LastLotto < 1296000)
{
InSim.Send_MTC_MessageToConnection("^6>You have to wait ^73 ^6hours to buy another one!", MSO.UCID, 0);
Connections[GetConnIdx(MSO.UCID)].InLotto = 1;
}
else
{
Connections[GetConnIdx(MSO.UCID)].InLotto = 0;
}
Connections[GetConnIdx(MSO.UCID)].Lotto = 0;
Connections[GetConnIdx(MSO.UCID)].LastLotto = Environment.TickCount;
break;
// Health Timer
private void HCount_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
try
{
foreach (clsConnection Ply in Connections)
{
Ply.Health -= 2;
}
}
catch { }
}
public int Health
{
get { return _health; }
set { _health = value; }
}